How to implement the Android ActionBar back button?

后端 未结 12 2208
天涯浪人
天涯浪人 2020-11-29 15:38

I have an activity with a listview. When the user click the item, the item \"viewer\" opens:

List1.setOnItemClickListener(new OnItemClickListener() {
    @Ov         


        
12条回答
  •  囚心锁ツ
    2020-11-29 16:11

    Android Annotations:

    @OptionsItem(android.R.id.home)
    void homeSelected() {
        onBackPressed();
    }
    

    Source: https://github.com/excilys/androidannotations

提交回复
热议问题