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

  • SEARCH
  • Home
  • 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 7931739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:48:43+00:00 2026-06-03T20:48:43+00:00

I am building an application in which user logs In, by using username and

  • 0

I am building an application in which user logs In, by using username and password, Activities other than LoginActivity must have a logout option. I have visited few threads here on SO regarding it an dhave some idea od how to do that programmatically however I cant think of “where to place this logout button ?”.

I would love to have a navigation or Action bar like popular activities i.e. Facebook for Android, Twitter for Android or Google Play store have. Since in future it will be easier to add additional features on this Action / Navigation bar. How should I proceed ? Any blog, tutorial or link will be of great help…

I am targeting Android 2.1+ devices. Here are some threads which I have already read…
Using same logout function in all activities

Performing logout

How to logout and many more… As a result got some idea about the back end logic (Using Intent and Intent filters etc.) for logout but can’t figure out the UI design.

EDIT
In some answers it is suggested to use ActionBar, However as I know it is available only after 3.0+, How I provide such functionality for 2.1+, please help… any tutorial, blog or guide will be of great help.. I don’t expect code just some pointers to start with…

  • 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-06-03T20:48:44+00:00Added an answer on June 3, 2026 at 8:48 pm

    One solution would be, include the logout button and if any layout associated with it, within
    include tags in the layout file. Like

    <include> </include>
    

    With this, you at least don’t have to create it multiple times.

    To call it, in the click listener of the button, use a method with context as the parameter in a Global class. So that, you can call it from all the activities, avoiding the need for rewriting the code again.

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

Sidebar

Related Questions

I'm building a C# application which uses plug-ins. The application must guarantee to the
I am building a Monotouch application which downloads data from the server encrypted using
I am building an application which has multiple user entry screens. I would like
I am building a Rails application which allows a user to create an object
I am building a local intranet web application which uses the current user's AD
So, I'm building an application which save locations to a database using lat/lon coordinates.
I am building an application in Excel which will enable a user to select
I am building an application which uses Flashdata to display messages to the user
I am building a Android application which gives Travel Maps.User can navigate away from
I'm building an application in which I would like to let the user control

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.