title: Kivy ActionBar back Button to switch to previous screen
body: <p>I am trying to run this type of code on android but when i tap mobile back button, inspite of coming to the previous screen app is closed,
  i used this piece of code to stop the App for being closed:</p>
  
  <pre><code>def __init__(self, **kwargs):
      super(MyApp, self).__init__(**kwargs)
      Window.bind(on_keyboard=self.BackButton)
  
  
  def BackButton(self, window, key, *args):
      if key==27:
          return True
  </code></pre>
  
  <p>But how to return to the previous screen. and how to use ActionPrevious Button to come at previous screen?</p>
  
  <pre><code>from kivy.app import App
  from kivy.uix.boxlayout import BoxLayout
  from kivy.lang import Builder
  from kivy.uix.button import Button
  from kivy.uix.screenmanager import ScreenManager, Screen
  
  Builder.load_string("""
  &lt;MyAppGUI&gt;:
      orientation:'vertical'
      id: box
      ActionBar:
          ActionView:
              ActionPrevious:
                  title: 'How to go back using this button???'
                  with_previous: True
  
      ScreenManager:
          id: screenmanger
          Screen:
              name: 's1'
              Button:
                  text: 'goto screen 2'
                  on_release: screenmanger.current='s2'
          Screen:
              name: 's2'
              Button:
                  text: 'goto screen 3'
                  on_release: screenmanger.current='s3'
          Screen:
              name: 's3'
              Button:
                  text: 'goto main screen'
                  on_release: screenmanger.current='s1'
  
  
  
  
  """)
  
  class MyAppGUI(BoxLayout):
      pass
  
  class MyApp(App):
  
      def build(self):
          return MyAppGUI()
  
  
  if __name__=='__main__':
      MyApp().run()
  </code></pre>