I've got the problem that I need the height of the android tablet system bar. It's the same problem as over here, but I cant use this answer, because it gives me the same size as from the DisplayMetrics. At both ways I get the resolution with this bar allready calculated in it. (This problem doesnt appear at my smartphone, just on my tablet).
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Check out this answer here: https://stackoverflow.com/a/8367739/807499
It gives the full height of the screen. You can then minus the size given by DisplayMetrics or by your root layout's size.
Chris Banes mentioned this in a recent Droidcon talk. The whole talk is super relevant, but here's a link to the part that answers your question (for all form factors, including tablet).
https://youtu.be/_mGDMVRO3iE?t=1093
This is the correct way to get status bar and navigation bar sizes: setOnApplyWindowListener
I hope this helps!