This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
here is the button that does the job i want on_selection_change to do: | |
in kv | |
Button: | |
id: mybutton_id | |
detailBox: detailBox | |
size_hint: (None, .1) | |
text: 'press' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the function MedicalLst() works If i use it to build student_list. | |
furthermore, the callback prints the correct list to the terminal. | |
the question is why won't the callback update the listview? | |
here is the binding: btn1.bind(on_release= (callback2)) | |
here is the callback: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def callback2(instance): | |
global student_details | |
try: | |
if instance.state == 'down': | |
student_list.adapter.data = MedicalList() | |
elif instance.state == 'normal': | |
student_list.adapter.data = StudentList() | |
student_list.adapter.cached_views = [] | |
student_list.populate() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#:kivy 1.0 | |
#:import BoxLayout kivy.uix.boxlayout | |
#:import ToggleButton kivy.uix.togglebutton | |
<ButtonPanel@BoxLayout>: | |
orientation: 'vertical' | |
id: boxy | |
ToggleButton: | |
text: 'is this working?' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kivy | |
from kivy.uix.label import Label | |
from kivy.config import Config | |
from kivy.app import App | |
from kivy.uix.screenmanager import ScreenManager, Screen | |
from kivy.lang import Builder | |
import studentListview2 | |
import Layout_master6 | |
kivy.require('1.7.1') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clyde@clyde-N55SF:~$ cd buildozer-2 | |
clyde@clyde-N55SF:~/buildozer-2$ ^C | |
clyde@clyde-N55SF:~/buildozer-2$ buildozer android debug deploy run | |
# Check configuration tokens | |
# Ensure build layout | |
# Check configuration tokens | |
# Preparing build | |
# Check requirements for android | |
# Run 'dpkg --version' | |
# Cwd None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[app] | |
# (str) Title of your application | |
title = SafeTrip DetailView | |
# (str) Package name | |
package.name = myapp | |
# (str) Package domain (needed for android/ios packaging) | |
package.domain = org.test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
here is my SimpleListAdapter that i used to override he default one: | |
class SimpleListAdapter(SimpleListAdapter): | |
def __init__(self, **kwargs): | |
super(SimpleListAdapter, self).__init__(**kwargs) | |
self.args_converter= lambda row_index, x: {'text': x, | |
'size_hint_y': None, | |
'color' : [1,1,0,1], | |
'text_size': (250, 25), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
here is the adapter: | |
class studentDetailsAdapter(ListAdapter): | |
def __init__(self, **kwargs): | |
super(studentDetailsAdapter, self).__init__(**kwargs) | |
self.args_converter= lambda row_index, rec: {'text': rec, | |
'size_hint_y': None, | |
'text_size': (200, 30), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
here is my listadapter using an objectProperty: | |
class studentDetailsAdapter(ListAdapter): | |
SDA = ObjectProperty(None) | |
def __init__(self, **kwargs): | |
super(studentDetailsAdapter, self).__init__(**kwargs) | |
self.args_converter = lambda row_index, rec: {'text': rec, | |
class studentDetailsAdapter(ListAdapter): |
OlderNewer