Created
August 22, 2012 07:41
-
-
Save joujiahe/3423472 to your computer and use it in GitHub Desktop.
Android system ui definitions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SystemUI (status bar) layout policy | |
int shortSizeDp = shortSize | |
* DisplayMetrics.DENSITY_DEFAULT | |
/ DisplayMetrics.DENSITY_DEVICE; | |
if (shortSizeDp < 600) { | |
// 0-599dp: "phone" UI with a separate status & navigation bar | |
mHasSystemNavBar = false; | |
mNavigationBarCanMove = true; | |
} else if (shortSizeDp < 720) { | |
// 600-719dp: "phone" UI with modifications for larger screens | |
mHasSystemNavBar = false; | |
mNavigationBarCanMove = false; | |
} else { | |
// 720dp: "tablet" UI with a single combined status & navigation bar | |
mHasSystemNavBar = true; | |
mNavigationBarCanMove = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment