title: KivyMD UI and animations are slow and laggy on Android
body: <p>I'm working with <strong><a href="https://github.com/HeaTTheatR/KivyMD" rel="nofollow noreferrer">KivyMD</a></strong>. The UI is so slow. Animations are so slow and often stuck. Even in the <a href="https://github.com/HeaTTheatR/KivyMD/tree/master/demos/kitchen_sink" rel="nofollow noreferrer">Kitchen Sink</a> example. Although it's fine on my Windows and Linux. The problem is after building package for android.</p>
  
  <p>This is exactly my question and the answer given by developer:</p>
  
  <p><a href="https://github.com/HeaTTheatR/KivyMD/issues/77" rel="nofollow noreferrer">https://github.com/HeaTTheatR/KivyMD/issues/77</a></p>
  
  <p>Unfortunately it didn't help and UI is slow</p>
  
  <p>main.py:</p>
  
  <pre><code>from kivy.app import App
  from kivy.lang import Builder
  from kivy.uix.screenmanager import Screen,ScreenManager
  from kivy.uix.boxlayout import BoxLayout
  from kivy.core.window import Window
  from kivy.properties import StringProperty
  
  from kivymd.theming import ThemeManager
  from kivymd.utils.cropimage import crop_image
  from kivymd.tabs import MDTabs,MDTabsBase
  from kivymd.button import MDTextButton
  
  class Scr_Mng(ScreenManager):
      pass
  
  ################################ 
  
  class MainPage(Screen):
  
      def __init__(self, **kwargs):
          super(MainPage, self).__init__(**kwargs)
          Window_width, window_height = Window.size
          background_size = (int(Window_width),int(window_height))
          #crop_image(background_size , "bg.jpg" , "bg_croped.jpg"  )
  
  
  ##############################
  class Ask_tab(MDTabsBase):
      profile_pic = StringProperty('assets/bg.jpg')
      profile_name = StringProperty('Sina')
      def new_question(self,question):
          print(question)
  ##############################
  class Answer_tab(MDTabsBase):
      def load_questions(self):
          for x in range(20):
              self.ids.question_items_box.add_widget( Question_items() )
  
  ##############################
  
  class Question_items(BoxLayout):
      pass
  
  ##############################
  class Me_tab(MDTabsBase):
      pass
  ##############################
  
  class Myapp(App):
      theme_cls = ThemeManager()
      theme_cls.primary_palette = 'DeepPurple'
      title = "Navigation Drawer"
      theme_cls.theme_style = "Light"
      mainpage_title = "Ask/Answer"
  
      def build(self):
          return Scr_Mng()
  
  
  Myapp().run()
  </code></pre>
  
  <p>kv file:</p>
  
  <pre><code>#:import MDToolbar kivymd.toolbar.MDToolbar
  #:import MDTabs kivymd.tabs.MDTabs
  #:import MDLabel kivymd.label.MDLabel
  #:import MDTextField kivymd.textfields.MDTextField
  #:import MDTextFieldRound kivymd.textfields.MDTextFieldRound
  #:import MDRoundFlatButton kivymd.button.MDRoundFlatButton
  
  #:import MDCard kivymd.cards.MDCard  
  
  &lt;Scr_Mng&gt;:
      MainPage:
  
  &lt;Ask_tab&gt;:
      text: 'Ask'
      FloatLayout:
          size: root.width, root.height
          ScrollView:
              BoxLayout:
                  orientation: 'vertical'
                  size_hint_y: None
                  height: self.minimum_height
                  padding: dp(48)
                  spacing: dp(15)
  
                  BoxLayout:
                      size_hint: None,None
                      size: root.width*0.2,root.width*0.2
                      pos_hint: {'center_x': .5}
                      canvas.before:
                          Color:
                              rgba: 1,1,1,1
                          Ellipse:
                              pos: self.pos
                              size: self.size
                              source: 'assets/unknown.jpg'
  
                  MDLabel:
                      pos_hint: {'center_x': .5 }
                      size_hint: 1, None
                      height: root.width*0.1
                      text: root.profile_name
                      text_size: self.size
                      halign: 'center'
                      font_style: 'H6'   
  
                  MDTextField:
                      id: question_field
                      pos_hint: {'center_x': .5 }
                      size_hint_x: 0.8
                      multiline: True
                      hint_text: "What question is in your mind?"
                      helper_text: ""
                      helper_text_mode: "persistent"
                      max_text_length: 1000
                  MDRoundFlatButton:
                      text: "Post"
                      icon: "login"
                      pos_hint: {'center_x': .5}
                      width: 170
                      on_release: root.new_question(question_field.text)
  
  
  &lt;Answer_tab&gt;:
      text: 'Answer'
      on_kv_post: root.load_questions()
      FloatLayout:
          size: root.width, root.height
          ScrollView:
              BoxLayout:
                  id: question_items_box
                  orientation: 'vertical'
                  size_hint_y: None
                  height: self.minimum_height
                  padding: dp(15)
                  spacing: dp(15)
  
  &lt;Question_items&gt;:
      orientation: 'vertical'
      spacing: dp(15)
      size_hint: 1,None
      height: 300
      pos_hint: {'center_x': .5}
      BoxLayout:
          canvas.before:
              Color:
                  rgba: 0.3,0.5,0.2,1
              Rectangle:
                  pos: self.pos
                  size: self.size
      MDSeparator:
  
  
  &lt;Me_tab&gt;:
      text: 'Me'
  
  &lt;MainPage&gt;:
      name: 'main'
      # on_kv_post: root.load_main_tabs() 
      BoxLayout:
          orientation: 'vertical'
          MDToolbar:
              id: toolbar
              title: app.mainpage_title
              md_bg_color: app.theme_cls.primary_color
              background_palette: 'Primary'
              background_hue: '500'
              elevation: 10
              right_action_items:
                  [['dots-vertical', lambda x: None]]
  
          MDTabs:
              id: main_tabs
              Ask_tab:
              Answer_tab:
              Me_tab:
  </code></pre>