android - How to show application logo in tablet but not in phone device -
i creating application both tablet , phone.
question :
in app i want show application logo(i.e bigger app icon) in tablet not in phone devices.(in throught application)
that android phone device normal screen shows app icon , tablet shows app logo.
because tablet action bar have lot of space show app logo in phone not
how differ both.when run application?
i tried in app manifeast :android:logo="@drawable/applogo"
want use custom action bar imageview
using configuration...?
also following code recognising device :
if(getresources().getboolean(r.bool.istablet)) { setrequestedorientation(activityinfo.screen_orientation_sensor); getactionbar().setlogo(getresources().getdrawable(r.drawable.logo)); getactionbar().setdisplayshowcustomenabled(true); getactionbar().sethomebuttonenabled(true); } else { getactionbar().setlogo(null); }
using above logo not showing in tablet view.
i'd recommend read android: supporting multiple screens. i'd recommend taking note chapter: using configuration qualifiers. create different layout , drawable resources depending on screen size (yes size, because there no way see if tablet or phone).
Comments
Post a Comment