getAction Bar gives null pointer exception

后端 未结 2 2076
半阙折子戏
半阙折子戏 2020-12-22 04:03

i want to work with action bar in android. for this i use

getActionBar().setHomeButtonEnabled(true);

below the SetContentView . but is gi

2条回答
  •  [愿得一人]
    2020-12-22 04:33

    getActionBar() will return null for pre Honeycomb devices.

    If you are targeting Android v2.3 to 4.2 try out ActionBarSherlock.

提交回复
热议问题