worked on message listing compatibility or chip tag labeling
This commit is contained in:
parent
3940e24fb2
commit
a8e1e7a760
|
@ -29,4 +29,9 @@
|
||||||
MDList:
|
MDList:
|
||||||
id: ml
|
id: ml
|
||||||
Loader:
|
Loader:
|
||||||
ComposerButton:
|
ComposerButton:
|
||||||
|
|
||||||
|
<TimeTagRightSampleWidget>:
|
||||||
|
size_hint:(None, None)
|
||||||
|
font_style: 'Caption'
|
||||||
|
halign: 'center'
|
||||||
|
|
|
@ -32,18 +32,21 @@
|
||||||
divider: None
|
divider: None
|
||||||
on_press: root.detailedPopup()
|
on_press: root.detailedPopup()
|
||||||
BadgeText:
|
BadgeText:
|
||||||
|
size_hint:(None, None)
|
||||||
|
size:[120, 140] if app.app_platform == 'android' else [64, 80]
|
||||||
text: root.time_tag
|
text: root.time_tag
|
||||||
halign:'right'
|
halign:'center'
|
||||||
font_style:'Caption'
|
font_style:'Caption'
|
||||||
pos_hint: {'center_y': .8}
|
pos_hint: {'center_y': .8}
|
||||||
_txt_right_pad: dp(70)
|
_txt_right_pad: dp(70)
|
||||||
|
font_size: '11sp'
|
||||||
MDChip:
|
MDChip:
|
||||||
size_hint: (None, None)
|
size_hint: (.16 if app.app_platform == 'android' else .07 , None)
|
||||||
label: root.page_type
|
label: root.page_type
|
||||||
icon: ''
|
icon: ''
|
||||||
pos_hint: {'center_x': .94, 'center_y': .3}
|
pos_hint: {'center_x': .91 if app.app_platform == 'android' else .95, 'center_y': .3}
|
||||||
radius: 8
|
radius: 8
|
||||||
height: 18
|
height: self.parent.height/4
|
||||||
AvatarSampleWidget:
|
AvatarSampleWidget:
|
||||||
source: root.avatarImg
|
source: root.avatarImg
|
||||||
MDLabel:
|
MDLabel:
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
size_hint_y: None
|
size_hint_y: None
|
||||||
orientation: 'vertical'
|
orientation: 'vertical'
|
||||||
spacing:dp(20)
|
spacing:dp(15)
|
||||||
MDLabel:
|
MDLabel:
|
||||||
font_style: 'Subtitle2'
|
font_style: 'Subtitle2'
|
||||||
theme_text_color: 'Primary'
|
theme_text_color: 'Primary'
|
||||||
|
@ -128,6 +128,9 @@
|
||||||
text: "Address"
|
text: "Address"
|
||||||
font_size: '17sp'
|
font_size: '17sp'
|
||||||
halign: 'left'
|
halign: 'left'
|
||||||
|
Widget:
|
||||||
|
size_hint_y: None
|
||||||
|
height: dp(1)
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
orientation: 'horizontal'
|
orientation: 'horizontal'
|
||||||
MDLabel:
|
MDLabel:
|
||||||
|
|
|
@ -114,22 +114,22 @@ def ShowTimeHistoy(act_time):
|
||||||
|
|
||||||
def AddTimeWidget(time): # pylint: disable=redefined-outer-name
|
def AddTimeWidget(time): # pylint: disable=redefined-outer-name
|
||||||
"""This method is used to create TimeWidget"""
|
"""This method is used to create TimeWidget"""
|
||||||
action_time = BadgeText(
|
action_time = TimeTagRightSampleWidget(
|
||||||
size_hint=(None, None),
|
|
||||||
text=str(ShowTimeHistoy(time)),
|
text=str(ShowTimeHistoy(time)),
|
||||||
halign='right',
|
|
||||||
font_style='Caption',
|
font_style='Caption',
|
||||||
size=[65, 70])
|
size=[120, 140] if platform == 'android' else [64, 80])
|
||||||
|
action_time.font_size='11sp'
|
||||||
return action_time
|
return action_time
|
||||||
|
|
||||||
|
|
||||||
def chipTag(text):
|
def chipTag(text):
|
||||||
"""This method is used for showing chip tag"""
|
"""This method is used for showing chip tag"""
|
||||||
obj = MDChip()
|
obj = MDChip()
|
||||||
obj.size_hint = (None, None)
|
# obj.size_hint = (None, None)
|
||||||
|
obj.size_hint = (.16 if platform == 'android' else .07 , None)
|
||||||
obj.label = text
|
obj.label = text
|
||||||
obj.icon = ''
|
obj.icon = ''
|
||||||
obj.pos_hint = {'center_x': .96, 'center_y': .2}
|
obj.pos_hint = {'center_x': .91 if platform == 'android' else .94, 'center_y': .3}
|
||||||
obj.height = dp(18)
|
obj.height = dp(18)
|
||||||
obj.radius = 8
|
obj.radius = 8
|
||||||
return obj
|
return obj
|
||||||
|
@ -420,31 +420,15 @@ class MyAddress(Screen):
|
||||||
if state.association == item['secondary_text']:
|
if state.association == item['secondary_text']:
|
||||||
badge_obj = BadgeText(
|
badge_obj = BadgeText(
|
||||||
size_hint=(None, None),
|
size_hint=(None, None),
|
||||||
text='Active', halign='right',
|
text='Active', halign='center',
|
||||||
# font_size = '50sp',
|
# font_size = '50sp',
|
||||||
font_style='Body1', size=[50, 60],
|
font_style='Body1', size=[85 if platform == 'android' else 50, 60],
|
||||||
theme_text_color='Custom',
|
theme_text_color='Custom',
|
||||||
text_color=NavigateApp().theme_cls.primary_color)
|
text_color=NavigateApp().theme_cls.primary_color)
|
||||||
badge_obj.font_size = '13sp'
|
badge_obj.font_size = '13sp'
|
||||||
meny.add_widget(badge_obj)
|
meny.add_widget(badge_obj)
|
||||||
else:
|
else:
|
||||||
meny.add_widget(ToggleBtn(active=True if is_enable == 'true' else False))
|
meny.add_widget(ToggleBtn(active=True if is_enable == 'true' else False))
|
||||||
# carousel = Carousel(direction='right')
|
|
||||||
# carousel.height = meny.height
|
|
||||||
# carousel.size_hint_y = None
|
|
||||||
# carousel.ignore_perpendicular_swipes = True
|
|
||||||
# carousel.data_index = 0
|
|
||||||
# carousel.min_move = 0.2
|
|
||||||
# del_btn = Button(text='Disable' if is_enable == 'true' else 'Enable')
|
|
||||||
# if is_enable == 'true':
|
|
||||||
# del_btn.background_normal = ''
|
|
||||||
# del_btn.background_color = (1, 0, 0, 1) if is_enable == 'true' else (0, 1, 0, 1)
|
|
||||||
# del_btn.bind(
|
|
||||||
# on_press=partial(
|
|
||||||
# self.disableAddress if is_enable == 'true' else self.enableAddress , item['secondary_text']))
|
|
||||||
# carousel.add_widget(del_btn)
|
|
||||||
# carousel.add_widget(meny)
|
|
||||||
# carousel.index = 1
|
|
||||||
self.ids.ml.add_widget(meny)
|
self.ids.ml.add_widget(meny)
|
||||||
|
|
||||||
def check_scroll_y(self, instance, somethingelse):
|
def check_scroll_y(self, instance, somethingelse):
|
||||||
|
@ -2234,6 +2218,12 @@ class IconRightSampleWidget(IRightBodyTouch, MDIconButton):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class TimeTagRightSampleWidget(IRightBodyTouch, MDLabel):
|
||||||
|
"""Right icon sample widget"""
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class ToggleBtn(IRightBodyTouch, MDSwitch):
|
class ToggleBtn(IRightBodyTouch, MDSwitch):
|
||||||
"""Right toggle button widget"""
|
"""Right toggle button widget"""
|
||||||
pass
|
pass
|
||||||
|
|
Reference in New Issue
Block a user