start to resize status bar area based on device dimensions so that devices with nonstandard status bars don't draw the app window
beneath the statusbar.
This commit is contained in:
parent
42a9dbe392
commit
823f0ca856
3 changed files with 24 additions and 0 deletions
|
|
@ -135,4 +135,12 @@ public class Util {
|
|||
}
|
||||
}
|
||||
|
||||
public static int getStatusBarHeight(final Context context) {
|
||||
int result = 0;
|
||||
int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android");
|
||||
if (resourceId > 0) {
|
||||
result = context.getResources().getDimensionPixelSize(resourceId);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue