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 6540603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:59:53+00:00 2026-05-25T10:59:53+00:00

If I press the back button from my main activity I get a black

  • 0

If I press the back button from my main activity I get a black screen. Is this normal behavior ? To get round this I have put in the following code – is this an ok work around ?

public void onBackPressed() {

return;
}

EDIT

Here is the manifest in case it is wrong :

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="org.example.DatabaseImport"
  android:versionCode="1"
  android:versionName="1.0"
  android:screenOrientation="portrait">
<uses-sdk android:minSdkVersion="8" />

<application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".Main"
              android:label="@string/app_name"
              android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 
              >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".DetailView"
    android:label="@string/detail_label"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 
    >
    </activity>
</application>
</manifest>
  • 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-25T10:59:53+00:00Added an answer on May 25, 2026 at 10:59 am

    It’s not a normal behavious.
    Do you have an initial activity from which you start your “main” activity?
    Do you have any key listeners?

    It sounds like you have another activity calling your “main” activity and clicking back in the “main” activity goes back to the unfinished initial activity.

    EDIT:
    From your edit I see you don’t have an additional activity before the main one, so the only assumption is that you’re doing something wrong in onStop / onPause or onDestroy. Please paste these.

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

Sidebar

Related Questions

I'm going from main activity to another activity and then when I press back
I'm having a requirement where i can press a logout button from any activity
I have an Activity ( Main ) which shows tabs like this: private void
I have a main activity which calls a child one via Intent I =
I have 3 screens(xmls): screen 1 is main menu, screen 2 is main game
Is it possible to stop the back button from working during a data call?
Suppose There are some activity. I want to start another activity from the main
I have Main Activity. That has 4 tabs ( TabHost ). I have overridden
I have two button's in the main menu. I invoking the camera when I
My situation is this. I have an OrmLiteBaseActivity where there is my main menu.

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.