有没有办法像这样在xml文件中获取android中导航栏的大小?
android:paddingTop="?android:attr/actionBarSize"
actionBarSize在哪里是导航栏大小?
在android源代码中查找后,导航栏高度似乎变暗了:
@android:dimen/navigation_bar_height
还有其他链接到导航栏的调子,例如android values / dimens.xml中的示例:
<!-- Height of the bottom navigation / system bar. -->
<dimen name="navigation_bar_height">48dp</dimen>
<!-- Height of the bottom navigation bar in portrait; often the same as @dimen/navigation_bar_height -->
<dimen name="navigation_bar_height_landscape">48dp</dimen>
<!-- Width of the navigation bar when it is placed vertically on the screen -->
<dimen name="navigation_bar_width">42dp</dimen>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句