Change tabs on the Height action bar

I am trying to change the height of tabs under the action bar in Android. I searched a lot for this and tried many solutions, such as installing Themes in the application in the manifest and much more. Below is one of those topics that I have applied but have not been successful.

<style name="CustomActionBarTheme" parent="@android:style/Theme.Holo">
        <item name="android:actionBarTabStyle">@style/ActionBarTabStyle</item>
        <item name="android:scrollHorizontally">false</item>
        <item name="android:paddingLeft">0dp</item>
        <item name="android:paddingRight">0dp</item>
        <item name="android:actionBarSize">80dp</item>
        <item name="actionBarSize">80dp</item>
</style>

and I also tried this:

<style name="Widget.Holo.Tab" parent="@android:style/Widget.Holo.Light.ActionBar.TabView">
    <item name="android:height">200dp</item>
</style>

<style name="MyTabTheme" parent="@android:style/Theme.Holo.Light">
    <item name="android:actionBarTabStyle">@style/Widget.Holo.Tab</item>
</style>

I want to add an icon and text below. Please help me solve this.

Thanks in advance.

+3
source share
2 answers

It seems that the height Tabshould be equal to the height ActionBar. Try changing the height Tabfrom 200 dpto 80 dpor changing the height ActionBarfrom 80 dpto 200 dp. Although this may not be your expected answer.

<!--Start Theme custom action bar theme -->
<style name="LeActionBarTheme"
    parent="@style/Theme.AppCompat.Light.DarkActionBar">
    <item name="android:actionBarStyle">@style/MyActionBar</item>
    <item name="android:actionBarTabStyle">@style/MyActionBarTab</item>
    <item name="android:actionBarTabTextStyle">@style/MyActionBarTabText</item>
    <item name="android:actionBarSize">60dp</item>
    <!-- Support library compatibility -->
    <item name="actionBarStyle">@style/MyActionBar</item>
    <item name="actionBarTabStyle">@style/MyActionBarTab</item>
    <item name="actionBarTabTextStyle">@style/MyActionBarTabText</item>
    <item name="actionBarSize">60dp</item>
</style>

<!-- ActionBarTab Styles -->
<style name="MyActionBarTab"
    parent="@style/Widget.AppCompat.ActionBar.TabView">
    <item name="android:height">60dp</item>
</style>
+1
source

3 :

<style name="ActionBar.Solid.Mg_style" parent="@android:style/Widget.Holo.Light.ActionBar.Solid">

    <item name="android:actionBarSize">150dp</item>
    <item name="android:height">150dp</item>
    <item name="android:width">150dp</item>

</style>

ActionBar.Solid.Mg_style :

<style name="AppTheme" parent="Theme_Mg_style">            
    <item name="android:windowTitleSize">54dip</item>
</style>

<style name="Theme_Mg_style" parent="@android:style/Theme.Holo.Light">
    <item name="android:actionBarStyle">@style/ActionBar.Solid.Mg_style</item>

0

All Articles