Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.78 KB | None | 0 0
  1.         /*
  2.          * this hack assumes people change build.prop for increasing
  3.          * the virtual size of their screen by decreasing dpi in
  4.          * build.prop file. this is often done especially for hd
  5.          * phones. keep in mind changing build.prop and density
  6.          * isnt officially supported, but this should do for most cases
  7.          */
  8.         if(densityDpi < 240 && densityDpi >160)
  9.             mDensityScaleFactor=(float)(240.0 / densityDpi);
  10.         if(densityDpi < 160 && densityDpi >120)
  11.             mDensityScaleFactor=(float)(160.0 / densityDpi);
  12.         // support for 1024x800 resoltion tablets with default density of 160 (i.e. folio)
  13.         if(densityDpi == 160 && r.getDisplayMetrics().widthPixels == 800)
  14.             mDensityScaleFactor=(float)1.9;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement