Window animation overlaps navigation bar on Android 5.0

前端 未结 2 1614
春和景丽
春和景丽 2021-02-02 15:58

I\'m implementing the Material Design bottom sheet design pattern in my app using a custom subclass of Dialog. The dialog is gravitated to the bottom of the screen

相关标签:
2条回答
  • 2021-02-02 16:21

    Just use <item name="android:windowDrawsSystemBarBackgrounds">false</item> for activity where you show your dialog. In this case your dialog will be under navigation bar during animation.

    0 讨论(0)
  • 2021-02-02 16:24

    From the android developers website:

    In this release, Android introduces a new Toolbar widget. This is a generalization of the Action Bar pattern that gives you much more control and flexibility. Toolbar is a view in your hierarchy just like any other, making it easier to interleave with the rest of your views, animate it, and react to scroll events. You can also set it as your Activity’s action bar, meaning that your standard options menu actions will be display within it.

    So the actionbar is now a view in your layout, that's why the popup goes over it. I also know they introduced some z-index properties, it might be helpful for you.

    0 讨论(0)
提交回复
热议问题