Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4535274
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:23:06+00:00 2026-05-21T14:23:06+00:00

I have an app in which the user logs in from a main activity,

  • 0

I have an app in which the user logs in from a main activity, and then can browse through a heirarchy of entities using listviews. So, the Activity stack would look something like this:

A -> B -> B -> B -> …

where the number of B’s is proportional to how deep you are in the tree of entities.
Frequently, I find myself pressing backbackbackbackback to get to the root (the first ‘B’), but one too many presses and I log myself out, or even leave the app. I’m considering overriding the back button so that, when pressed from the root B, it will pop up a dialog essentially saying “Log out? (Y/N)”, thus blocking a string of back-presses from completely exiting the app.

I’ve noticed a sort of sensitivity regarding overriding the back button, though, and – while it makes sense to me – I want to know if this is considered a good use of the back button.

So:
Would this be considered an appropriate/conventional override of the back button?
Is there a better/more conventional way to accomplish this without overriding?

Also, so this question might be more generally useful in the future, are there any guidelines for what is acceptable/unacceptable when overriding the back button?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T14:23:06+00:00Added an answer on May 21, 2026 at 2:23 pm

    I would find this use acceptable; I’ve seen a number of apps that ask for a confirm before exit – if the user wants to exit an app, they usually will press the Home button and let Android handle the finish() if and when it’s needed.

    I know I’ve accidentally exited an app by pressing back too many times 🙁

    Dotmister’s comment about Handcent is spot on – the back button should feel natural to the user; your use seems to adhere to this, in that a user will cycle back through activities as expected for the most part. As he said though, give it a try and test it.

    Coincidentally, I have a similar flow in my app, but I’ve included a button for the root activity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app which could benefit from the user being able to choose
I have made app which allows me to send message to multiple user from
I have a web app which connects to a server using a TCP connection
I have a small app which references the Microsoft.SqlServer.Smo assembly (so I can display
I have an iPhone app which submits user entered data to a SQL database.
So I have an iPhone app which should aid the user to find a
I'm building an app using someone else's API allowing the user to browse content
I have a Winforms app which runs under a standard user account (i.e. user
I have an app which is providing a zoomable MKMapView to the user. I
I am working on an app in which user have to send an email,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.