Advertisement
Guest User

Untitled

a guest
Jan 17th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. #:kivy 1.11.1
  2.  
  3. MyScreenManager:
  4.  
  5. DATA:
  6. name: 'data'
  7.  
  8.  
  9. <DATA>
  10.  
  11. search_text_input:search_text_input
  12. search_text:search_text_input.text
  13.  
  14.  
  15. FloatLayout:
  16.  
  17. TextInput:
  18. id:search_text_input
  19. multiline : False
  20. pos_hint: {'top':.9515,'x':.35}
  21. size_hint: .6,.1
  22.  
  23. Button:
  24. text:'Reset Search'
  25. pos_hint: {'top':.9515,'x':.05}
  26. size_hint: .25,.1
  27. on_release:
  28. root.reset_search()
  29. Button:
  30. text: "Back"
  31. pos_hint: {'x':.05,'y':.05}
  32. size_hint: .25,.1
  33. on_release:
  34. root.manager.transition.direction = 'right'
  35. root.manager.current = 'welcome'
  36.  
  37. BoxLayout:
  38. orientation:'vertical'
  39.  
  40. pos_hint: {'x': .05, 'top': .75}
  41. size_hint: .25,.2
  42. Button:
  43. text: 'Box'
  44. on_release:
  45. root.get_boxes()
  46. Button:
  47. text: 'Contact'
  48. on_release:
  49. root.get_contacts()
  50.  
  51. Button:
  52. text: 'New Entry'
  53. on_release:
  54. root.new_entry()
  55.  
  56. <newEntry>:
  57. auto_dismiss: False
  58. title: ""
  59. separator_height: 0
  60. pos_hint: {'x':0,'y':.5}
  61. size_hint: 1,.5
  62.  
  63. FloatLayout:
  64. MyTextInput:
  65. id: box
  66. pos_hint:{'x':.085,'y':.8}
  67. size_hint: .1,.15
  68. hint_text: "**req**"
  69. MyTextInput:
  70. id: reagentName
  71. pos_hint:{'x':.2,'y':.6}
  72. size_hint:.25,.15
  73. hint_text: '**required**'
  74. MyTextInput:
  75. id: contact
  76. pos_hint:{'x':.2,'y':.4}
  77. size_hint:.25,.15
  78. hint_text: '**required**'
  79. MyTextInput:
  80. id: number
  81. pos_hint:{'x':.3,'y':.8}
  82. size_hint: .15,.15
  83. hint_text: '**required**'
  84.  
  85.  
  86. Label:
  87. pos_hint:{'x':-.45,'y':.375}
  88. text: 'BOX:'
  89. Label:
  90. pos_hint:{'x':-.25,'y':.375}
  91. text: 'NUMBER:'
  92. Label:
  93. pos_hint:{'x':-.395,'y':.175}
  94. text: 'REAGENT NAME:'
  95. Label:
  96. pos_hint:{'x':-.4245,'y':-.025}
  97. text: 'CONTACT:'
  98.  
  99. BoxLayout:
  100. orientation: 'vertical'
  101. size_hint: .4,.5
  102. spacing: '20dp'
  103. pos_hint: {'x':.55,'y':.425}
  104.  
  105. Button:
  106. text:'Note 1'
  107. Button:
  108. text:'Note 2'
  109.  
  110.  
  111. BoxLayout:
  112. orientation: 'horizontal'
  113. size_hint: 1,.15
  114. pos_hint: {'x':0,'y':.01}
  115.  
  116. Button:
  117. text: 'Close'
  118. on_release:
  119. root.dismiss()
  120. Button:
  121. text: 'Submit'
  122. on_release:
  123. root.submit()
  124.  
  125.  
  126. <SelectableButton>:
  127. # Draw a background to indicate selection
  128. canvas.before:
  129. Color:
  130. rgba: (.0, 0.9, .1, .3) if self.selected else (0, 0, 0, 1)
  131. Rectangle:
  132. pos: self.pos
  133. size: self.size
  134.  
  135. <RV>:
  136. BoxLayout:
  137. orientation: "vertical"
  138.  
  139. GridLayout:
  140. size_hint: 1, None
  141. size_hint_y: None
  142. height: 25
  143. cols: 2
  144.  
  145. BoxLayout:
  146. RecycleView:
  147. id: rv
  148. viewclass: 'SelectableButton'
  149. data: [{'text': str(x)} for x in root.data_items]
  150. SelectableRecycleGridLayout:
  151. cols: 2
  152. default_size: None, dp(26)
  153. default_size_hint: 1, None
  154. size_hint_y: None
  155. height: self.minimum_height
  156. orientation: 'vertical'
  157. multiselect: True
  158. touch_multiselect: True
  159. on_touch_down:
  160. root.selectable_button_function()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement