Android: getSupportActionBar() always returns null in ActionBarSherlock library

前端 未结 14 699
盖世英雄少女心
盖世英雄少女心 2020-11-29 05:29

I\'m trying to use the ActionBarSherlock library to provide backwards compatible ActionBar support with tabs in my Android app, so I downloaded the latest build, built the d

14条回答
  •  隐瞒了意图╮
    2020-11-29 06:12

    I added android:theme="@android:style/Theme.Dialog" to my activity in the Android Manifest file in an attempt to make it a dialogue activity. This too will remove the action bar hence a null pointer. Remove it or don't call getSupportActioBar

提交回复
热议问题