getActionBar() returns null in PreferenceActivity (AppCompat-v7 21)

后端 未结 4 2039
离开以前
离开以前 2020-12-09 16:12

I have implemented DoneBar (two buttons in actionbar) in PreferenceActivity as provided in v20 sdk samples, but after updating SDK and AppCompat to version 21 m

4条回答
  •  粉色の甜心
    2020-12-09 16:18

    Issue resolved by doing this, your styles xml should looks like this.

    res/values/style.xml

    
    
    

    res/values-v11/style.xml

    
    

    res/values-v14/style.xml

    
    

提交回复
热议问题