2014-07-18 2 views
1

ActionBarTabs이 이렇게 보이길 원합니다.사용자 정의 액션 바 높이 및 동작 바 Tab 높이

무시하세요 색상

enter image description here

가 현재는이

enter image description here

처럼 보이는 때문에 내 주제에, 나는 자바에서 사용자 정의 ActionBar을 설정해야합니다. 여기

actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); 
actionBar.setCustomView(R.layout.custom_action_bar); 

은 내 styles.xml

<resources> 

    <!-- You are NOT seeing this theme --> 
    <style name="AppTheme" parent="android:Theme.Holo.Light.NoActionBar"></style> 

    <!-- You ARE seeing this theme --> 
    <style name="ScoreBoardStyles" parent="android:Theme.Holo.Light"> 
     <item name="android:actionBarStyle">@style/CustomActionBar</item> 
     <item name="android:actionBarTabStyle">@style/CustomTabs</item> 
     <item name="android:actionBarSize">160dp</item> 
    </style> 

    <style name="CustomActionBar" parent="@android:style/Widget.Holo.Light.ActionBar"> 
     <item name="android:height">80dp</item> 
    </style> 

    <style name="CustomTabs" parent="@android:style/Widget.Holo.ActionBar.TabView"> 
     <item name="android:background">@drawable/tab_indicator</item> 
     <item name="android:height">80dp</item> 
    </style> 

</resources> 
  1. ActionBarTabView 이하?

  2. 왜 내 TabView의 높이가 변하지 않습니까?

나는 이와 비슷한 다른 질문이 있지만이 중 어느 것도 해당 사항이 없음을 알고 있습니다.

아이디어가 도움이됩니다.

감사합니다.

+0

저는 사용자 정의보기와 관련이 있다고 확신합니다. 탭을 추가하려면 actionBar.setNavigationMode (ActionBar.NAVIGATION_MODE_TABS); – ksarmalkar

+0

@ksarmalkar 탭이 잘로드되어 잘 작동합니다. 스타일은 전혀 작동하지 않습니다. – Michael

답변

1

bugthis이 도움이 될 수 있습니다. 또는 검색을 수행하면 더 많은 옵션이 있습니다.

+0

고맙습니다! 그것은 일했다! – Michael