I have been trying to implement a SearchView on action bar in my project. I want to change text size of title action bar. Is it to possible?
Asked
Active
Viewed 419 times
1
-
check http://stackoverflow.com/questions/12897071/how-to-change-size-of-titles-text-on-action-bar http://stackoverflow.com/questions/9133290/what-is-the-default-actionbar-title-font-size – Jaiprakash Soni Aug 04 '15 at 10:34
-
I alread ygo through this link but did not getting any help from that link. @JaiSoni – Menu Aug 04 '15 at 10:36
2 Answers
0
Create a custome style in style.xml and add into application in manifst.xml file like:
<style name="AppTheme.NoTitleBar" parent="android:Theme.Light">
<item name="android:windowNoTitle">true</item>
<item name="android:dropDownListViewStyle">@style/TestStyle</item>
</style>
<style name="TestStyle" parent="android:style/Widget.ListView.DropDown">
<item name="android:divider">#ff6600</item>
<item name="android:dividerHeight">2dp</item>
</style>

Suman Dey
- 66
- 1
- 10
0
you can use Custom Action bar for that: for this you can find action bar and use this code to set custom Action Bar like:
ActionBar ab = getActionBar();
ab.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
View actionBarView = getLayoutInflater().inflate(R.layout.custom_action_bar, null);
ab.setCustomView(actionBarView);
enjoy your code :)-

John smith
- 1,781
- 17
- 27
-
-
How to set background color, text size, text color, alignment and all?? @PiyushGupta – Menu Aug 04 '15 at 11:16
-
ohk dear.there is an xml file over my code *custom_action_bar* now in this class you can modify all things with your Ui of ActionBar. – John smith Aug 04 '15 at 11:23