How to use ActionBarActivity with Theme.Material

前端 未结 3 2039
被撕碎了的回忆
被撕碎了的回忆 2020-12-09 16:01

I created a new project targeting the L preview. The starter activity that the sdk generates extends ActionBarActivity, however, when I try to run the bare-bone generated ac

相关标签:
3条回答
  • 2020-12-09 16:26

    AppCompat v21.+'s Theme.AppCompat extends Theme.Base.AppCompat which extends Theme.Platform.AppCompat which extends android:Theme.Material on 21+ devices (i.e., Android L) devices so you shouldn't have to do anything specific to get the Material theme if you are using AppCompat.

    0 讨论(0)
  • 2020-12-09 16:30

    Use the following Theme:

    android:theme="@style/Base.V7.Theme.AppCompat" >
    
    0 讨论(0)
  • 2020-12-09 16:38

    You need to change dependency in the build gradle to

    compile 'com.android.support:appcompat-v7:21.+'
    
    0 讨论(0)
提交回复
热议问题