onbackpressed

	@Override
    public void onBackPressed() {
        super.onBackPressed();
    }

3.86
7
Awgiedawgie 440220 points

                                    @Override
public void onBackPressed() {
    new AlertDialog.Builder(this)
        .setTitle("Really Exit?")
        .setMessage("Are you sure you want to exit?")
        .setNegativeButton(android.R.string.no, null)
        .setPositiveButton(android.R.string.yes, new OnClickListener() {

            public void onClick(DialogInterface arg0, int arg1) {
                WelcomeActivity.super.onBackPressed();
            }
        }).create().show();
}

3.86 (7 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
onBackPressed(); onBackPressed() onBackPressed() in fragment android implement onbackpressed in activity android onBackPressed() in android onbackpressed in android activity on back pressed android onbackpressed in how to use onBackpressed method in android android studio onBackPressed() onbackpressed dialog android on back pressed callback android this.onBackPressed(); android onbackpressed button handle in flutter onbackpressed custome on back press android sudio onbackbuttonpressed android java android onbackpressed capture by view onbackpressed method in android activity onbackpressed super.onBackPressed(); how to use onBack pressed on back press in settings onbackpressed in activity back button pressed android studio on back press android studio android kotlin viewmodel onBackPressed window consuming onBackPressed events android android on button back press super.onbackpressed() disable on back press in navhost android android use return onBackPressed activity listen back button android onback pressed android on back pressed kotlin back button listener android java onbackpressed how to stop action back pressed button listener in android studio back pressed button listener in android studio listen back button on activity android onbackpressed in android getintent when back pressed android android studio onbackpressed where to put onbackpressed ONBACKPRESSED ANDROID STUDIO onbackpressed android onbackpressed kotlin android app github textinputlayout android studio android findviewbyid viewholder android viewholder scrol android Android splashscreen flicker flutter android contextmenu android setVisibility programatically onbackpressed android
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source