どうやってやるの?
ボタンクリック時:
mycontext.finish();
そして:もう一度始めますか?
次のいずれかを試すことができます。
MyActivity.finish()
Intent intent = new Intent(MyActivity.this, MyActivity.class);
startActivity(intent);
または、それが機能しない場合は、次のようにすることができます。
private boolean isRestarting = false;
...
// When button is pressed
isRestarting = true;
myactivity.finish();
...
// in the onDestroy() method
if(isFinishing() && isRestarting){
Intent intent = new Intent(MyActivity.this, MyActivity.class);
startActivity(intent);
}