def __init__(self, **kw):
super(CircularTimePicker, self).__init__(**kw)
self.selector_color = self.theme_cls.primary_color[0], self.theme_cls.primary_color[1], \
self.theme_cls.primary_color[2]
self.color = self.theme_cls.text_color
self.primary_dark = self.theme_cls.primary_dark[0] / 2, self.theme_cls.primary_dark[1] / 2, \
self.theme_cls.primary_dark[2] / 2
self.on_ampm()
if self.hours >= 12:
self._am = False
self.bind(time_list=self.on_time_list,
picker=self._switch_picker,
_am=self.on_ampm,
primary_dark=self._get_ampm_text)
self._h_picker = CircularHourPicker()
self.h_picker_touch = False
self._m_picker = CircularMinutePicker()
self.animating = False
Clock.schedule_once(self.on_selected)
Clock.schedule_once(self.on_time_list)
Clock.schedule_once(self._init_later)
Clock.schedule_once(lambda *a: self._switch_picker(noanim=True))
评论列表
文章目录