How to finish an android application?

前端 未结 9 1278
轻奢々
轻奢々 2020-11-28 06:28

I need to finish an android application. For that i wrote

@Override
public void onBackPressed() {
    AlertDialog.Builder builder = new AlertDialog.Builder(         


        
9条回答
  •  感情败类
    2020-11-28 07:13

    whenever you are starting a new activity use

    myintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    startActivity(myintent);
    

    and in manifest file mention that activity as

    
            
            
         
         
           
    

提交回复
热议问题