How to fix the Snackbar height and position?

后端 未结 7 1128
甜味超标
甜味超标 2021-02-08 03:16

On Android Support Library 24.1.1, the Snackbar was working fine:

Then starting on Android Support Library 24.2.0 onwards, the

相关标签:
7条回答
  • 2021-02-08 04:08

    Look this answer https://stackoverflow.com/a/42180120/2550743 and just replace

     params.setMargins(params.leftMargin,
                params.topMargin,
                params.rightMargin,
                params.bottomMargin + ScreenUtils.getNavigationBarHeight(activity));
    

    to

     params.setMargins(params.leftMargin,
                params.topMargin,
                params.rightMargin,
                params.bottomMargin - ScreenUtils.getNavigationBarHeight(activity));
    
    0 讨论(0)
提交回复
热议问题