android - Seven inch tablet layout issue -


i developing app multiple screen support. used layout-sw720dp folder 10 inch tablets , layout folder smartphones , 7 inch tablets. tested app in lanix ilium pad t7 http://phoneradar.com/gadgets/phones/lanix/ilium-pad-t7/ , didn't take layouts layout folder. tried adding layout-sw600dp , layout-sw600dp-hdpi folders device still taking layouts layout-sw720dp.

what have take layouts folder different layout-sw720dp?

resources should this. if not working you, try test on other device.you can use usefull tool this (genymotion) non commercial use best,in opinion.

res/layout/main_activity.xml           # phones res/layout-sw600dp/main_activity.xml   # 7” tablets res/layout-sw720dp/main_activity.xml   # 10” tablets 

also can select resource use in code

public class myactivity extends activity {         @override protected void oncreate(bundle savedinstancestate) {             super.oncreate();              configuration config = getresources().getconfiguration();             if (config.smallestscreenwidthdp >= 600) {                 setcontentview(r.layout.main_activity_tablet);             } else {                 setcontentview(r.layout.main_activity);             }         }     } 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -