Back button on ActionBar/Toolbar | Android Studio | Kotlin

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ก.ย. 2024
  • This tutorial is about how to add back button in ActionBar/Toolbar and go to previous activity on pressed.
    We will create a button in MainActivity to move to NewActivity, and add back button in action bar of New Activity to move to previous activity(NewActivity).
    Buy Me a Coffee: paypal.me/atif...
    Source Code: devofandroid.bl...
    Feel free to comment in case of any problem
    Chanel:
    / mohammadatif1
    Websites:
    technifysoft.com/
    devofandroid.b...
    Apps/Games on PlayStore:
    play.google.co...
    If u like this video, Like, Comment, Subscribe to support us...

ความคิดเห็น • 20

  • @dvd8373
    @dvd8373 5 ปีที่แล้ว

    Super clara la explicacion, gracias

  • @Rohit-te9dr
    @Rohit-te9dr 2 ปีที่แล้ว

    why did you write this line ( actionBar.setDisplayHomeAsUpEnabled(true)) twice ???

  • @lawxultimateMan
    @lawxultimateMan 5 ปีที่แล้ว +1

    Thank you so much

  • @shubhangikamthe4538
    @shubhangikamthe4538 3 ปีที่แล้ว +1

    THANKS

  • @cleawrence
    @cleawrence 4 ปีที่แล้ว

    good! thx but for fragments how do you do ?

  • @patrickcommizza4754
    @patrickcommizza4754 4 ปีที่แล้ว +1

    When I tried to run application on devices,activity which appeared first is second activity not first activity.
    Hpw can I edit it

    • @superrueben
      @superrueben 3 ปีที่แล้ว

      I have the same problem - did you fix it? if so, how?

  • @TheUmi48
    @TheUmi48 3 ปีที่แล้ว +1

    Hi, when i press back, my app finish() and close

    • @TheUmi48
      @TheUmi48 3 ปีที่แล้ว

      I look my error, i finish() my last activity

    • @AtifSayings
      @AtifSayings  3 ปีที่แล้ว +1

      So is it resolved?

    • @TheUmi48
      @TheUmi48 3 ปีที่แล้ว

      Yes, thanks :)

  • @jefrychiedi
    @jefrychiedi 3 ปีที่แล้ว

    Thanks

  • @mkenzo_8
    @mkenzo_8 6 ปีที่แล้ว +1

    THANKS