@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
backButton(findViewById(R.id.imageButton1));
return false;
}
return false;
}
public void backButton(View v)
{
Intent intent = new Intent();
intent.setClass(this, xxx.class);
Bundle bundle = new Bundle();
bundle.putString("maptype",maptype);
intent.putExtras(bundle);
startActivity(intent);
finish();
}
沒有留言:
張貼留言