Project

General

Profile

« Previous | Next » 

Revision 7fe59aa5

Added by Leszek Koltunski almost 2 years ago

Correctly get the whole size fo the screen (along with thee top and bottom system bars) from the very beginning of the Activity.

View differences:

src/main/java/org/distorted/config/ConfigActivity.java
79 79
      mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
80 80

  
81 81
      DisplayMetrics displaymetrics = new DisplayMetrics();
82
      getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
82
      getWindowManager().getDefaultDisplay().getRealMetrics(displaymetrics);
83 83
      mScreenWidth =displaymetrics.widthPixels;
84 84
      mScreenHeight=displaymetrics.heightPixels;
85
      mScreenHeight = (int)(1.07f*mScreenHeight); // add 7% for the upper bar
86
                                                  // which is not yet hidden.
87
                                                  // TODO: figure this out exactly.
85

  
88 86
      hideNavigationBar();
89 87
      cutoutHack();
90 88
      computeBarHeights();

Also available in: Unified diff