getActionBar() returns null

前端 未结 24 1819
暗喜
暗喜 2020-11-22 13:31

I\'m having an odd problem. I am making an app with targetsdk 13.

In my main activity\'s onCreate method i call getActionBar() to setup my actionbar. T

24条回答
  •  故里飘歌
    2020-11-22 13:33

    ActionBar needs application or activity's Theme to have an app title. Make sure you have not styled your application or activity as Theme.NOTITLE.

     // remove this line if you have this in your code
    
    
     
    

提交回复
热议问题