2014-10-28 2 views
2

홀로 테마에서 새 머티리얼 테마 (Theme.AppCompat.Light.DarkActionBar)로 변경 한 후 내 액션 바의 모든 뒤로 버튼이 사라졌습니다. 그것은을 필요가있는새 materin 테마로 변경 한 후 뒤로 버튼이 누락되었습니다.

<!-- Base application theme. --> 
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> 

    <!-- App core design --> 
    <item name="colorPrimary">@color/green</item> 
    <item name="colorPrimaryDark">@color/greenDark</item> 
    <item name="colorAccent">@android:color/white</item> 

    <item name="android:textColorPrimary">@android:color/white</item> 

</style> 
+0

동일한 문제가 있습니다. 이유를 모르겠다. 고쳐 봤어? – Shaun

+0

아니요, 그 해결책을 찾지 못했습니다 .. – Idob

답변

5

이 활동의에서 onCreate에

getSupportActionBar().setDisplayHomeAsUpEnabled(true); 

을 추가

<activity 
     android:name=".ui.LeagueActivity" 
     android:label="@string/title_activity_league" 
     android:parentActivityName=".ui.LeagueListActivity" > 
     <!-- Parent activity meta-data to support 4.0 and lower --> 
     <meta-data 
      android:name="android.support.PARENT_ACTIVITY" 
      android:value=".ui.LeagueListActivity" /> 

</activity> 

그리고 내 응용 프로그램 테마 :

은 뒤로 버튼을해야 내 응용 프로그램입니다 뒤로/상위 버튼까지.

이렇게 수정되었습니다.

관련 문제