Android Is Taking Wrong Layout On Inflating View
I have layouts inside 3 folders: layout layout-large layout-xlarge When I start root activity everything is fine and android is inflating view from layout-xlarge folder (I' m using
Solution 1:
Just in case someone stumbles on same problem:
I had issue using class UrlImageViewHelper that was probably downloaded from github (nos sure anymore). Class is used to download and hash images. There was code:
if (mMetrics != null)
return;
mMetrics = newDisplayMetrics();
Activityact= (Activity) context;
act.getWindowManager().getDefaultDisplay().getMetrics(mMetrics);
AssetManagermgr= context.getAssets();
mResources = newResources(mgr, mMetrics, null);
By this you'll corrupt your resources (obviously)
Solution 2:
If your large corresponds to ~7 inch tablets, xlarge corresponds to ~10 inch tablets, it is more appropriate to use the qualifiers -sw600dp and -sw720dp respectively.
Post a Comment for "Android Is Taking Wrong Layout On Inflating View"