Revision 7fe59aa5
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/tutorials/TutorialActivity.java | ||
---|---|---|
92 | 92 |
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this); |
93 | 93 |
|
94 | 94 |
DisplayMetrics displaymetrics = new DisplayMetrics(); |
95 |
getWindowManager().getDefaultDisplay().getMetrics(displaymetrics); |
|
95 |
getWindowManager().getDefaultDisplay().getRealMetrics(displaymetrics);
|
|
96 | 96 |
mScreenWidth =displaymetrics.widthPixels; |
97 | 97 |
mScreenHeight=displaymetrics.heightPixels; |
98 | 98 |
|
Also available in: Unified diff
Correctly get the whole size fo the screen (along with thee top and bottom system bars) from the very beginning of the Activity.