예제 #1
0
 def __init__(self, **kwargs):
     if self.data_model is None:
         kwargs.setdefault('data_model', RecycleDataModel())
     if self.view_adapter is None:
         kwargs.setdefault('view_adapter', RecycleDataAdapter())
     kwargs.setdefault('cols', 1)
     super(RecycleButtons, self).__init__(**kwargs)
     fbind = self.fbind
     fbind('size', self.refresh_from_viewport)
     fbind('pos', self.refresh_from_viewport)
     self.refresh_from_data()
예제 #2
0
파일: __init__.py 프로젝트: ach5910/KivyApp
    def __init__(self, **kwargs):
        if self.data_model is None:
            kwargs.setdefault('data_model', RecycleDataModel())
        if self.view_adapter is None:
            kwargs.setdefault('view_adapter', RecycleDataAdapter())
        super(RecycleView, self).__init__(**kwargs)

        fbind = self.fbind
        fbind('scroll_x', self.refresh_from_viewport)
        fbind('scroll_y', self.refresh_from_viewport)
        fbind('size', self.refresh_from_viewport)
        self.refresh_from_data()