相关疑难解决方法(0)

如何实现Android ActionBar后退按钮?

我有一个listview的活动.当用户单击该项目时,项目"viewer"将打开:

List1.setOnItemClickListener(new OnItemClickListener() {
    @Override
    public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,long arg3) {

        Intent nextScreen = new Intent(context,ServicesViewActivity.class);
        String[] Service = (String[])List1.getItemAtPosition(arg2);

        //Sending data to another Activity
        nextScreen.putExtra("data", datainfo);
        startActivityForResult(nextScreen,0);
        overridePendingTransition(R.anim.right_enter, R.anim.left_exit);
    }
});
Run Code Online (Sandbox Code Playgroud)

这样可以正常工作,但在操作栏上,应用程序图标旁边的后退箭头不会被激活.我错过了什么吗?

java android android-3.0-honeycomb

124
推荐指数
7
解决办法
19万
查看次数

标签 统计

android ×1

android-3.0-honeycomb ×1

java ×1