Category: Android Kotlin

Android alertdialog on exit on back press | Exit/No Menu

Android confirmation dialog on┬áback press YES NO to exit application Android alertdialog on exit show Yes No to confirm exit your application when back button is pressed.   package write your package name here; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.Toast; public class MainActivity extends AppCompatActivity { @Override protectedvoidonCreate(BundlesavedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public void