Toolbar - Switching from drawer to back button with only one Activity

后端 未结 6 1573
予麋鹿
予麋鹿 2020-12-23 16:34

I\'ve been searching for a while on how to change between the drawer open/close icon (going from a hamburger to the arrow) to a simple back arrow. My application at the mome

6条回答
  •  一整个雨季
    2020-12-23 17:13

    The answer from @matusalem works great. I just had one bit to add to it - be careful because the drawer can also be opened by swiping in from the left side of the screen. For some, this may be desired, but for me I was disabling the drawer because it didn't make sense in any fragment but my main fragment. The swipe is easily disabled here - Navigation drawer - disable swipe

    This probably belongs in a comment to the answer, but I don't have enough reputation. My apologies.

提交回复
热议问题