I want to quit application through button click.
the code for button click is
quitBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View paramView) {
// TODO Auto-generated method stub
MainActivity.this.finish();
}
});
But it require two clicks to exit from the app.
use this code…i hope this will help you..