左上角返回键

 
  
back.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        new Thread() {
            public void run() {
                try {
                    Instrumentation inst = new Instrumentation();
                    inst.sendKeyDownUpSync(KeyEvent.KEYCODE_BACK);
                } catch (Exception e) {
                    Log.e("Exception when sendKeyDownUpSync",
                            e.toString());
                }
            }
        }.start();
    }
});

你可能感兴趣的:(Android)