large actionbar title in android -
in android app, have 3-inch sized title text ( requirement our designer).
i have actionbar tabs under title bar.
i tried make text big using below code gets clipped off. so, not able make taller. appreciated
void setcustomactionbar() { actionbar mactionbar = getactionbar(); linearlayout.layoutparams lp = new linearlayout.layoutparams( layoutparams.match_parent, layoutparams.wrap_content); mactionbar.setdisplayshowhomeenabled(false); mactionbar.setdisplayshowtitleenabled(true); layoutinflater minflater = layoutinflater.from(this); view mcustomview = minflater.inflate(r.layout.actionbar_customview, null); // actionbartitle textview mtitletextview = (textview) mcustomview .findviewbyid(r.id.actionbartitle); // lp.setmargins(0, 10, 0, 10); mtitletextview.settext("applause insights"); mtitletextview.settextsize(32); mtitletextview.setgravity(gravity.center_horizontal); mactionbar.setcustomview(mcustomview); mtitletextview.setlayoutparams(lp); mactionbar.setdisplayshowcustomenabled(true); }
try using android:height
following:
<style name="appactionbar"> <item name="android:height">50dp</item> </style> <style name="mainactivitystyle" parent="@android:style/theme.holo"> <item name="android:actionbarstyle">@style/appactionbar</item> </style>
for more information check link,
Comments
Post a Comment