Proper way to handle action bar up button?

后端 未结 6 1925
没有蜡笔的小新
没有蜡笔的小新 2020-12-02 20:50

I use ActionBarSherlock (although I don\'t think it matters).

I have a Main activity and an About activity. I want the About activity to show the back-arrow by its l

6条回答
  •  臣服心动
    2020-12-02 21:24

    Found out the root of my problem was a change in the manifest I made a while ago: I added this line:

    android:launchMode="singleInstance"
    

    so my main activity wouldn't be relaunched. Changing it to:

    android:launchMode="singleTask"
    

    solved my problems, and I was able to remove all the onOptionsItemSelected stuff. I knew there was something wrong, that Android should have been able to handle this better, and I was right. Check the manifest :P

提交回复
热议问题