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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:11:25+00:00 2026-05-25T20:11:25+00:00

My application’s main activity is the preferences page. This is what gets displayed when

  • 0

My application’s main activity is the preferences page. This is what gets displayed when the user clicks the application icon. I also have a service which sends the user status bar notifications, and can display a translucent overlay on the screen. I followed this post to create my transparent activity, and all of this works.

The problem is that ever time I display my translucent activity, the application’s main window (the preferences page) is visible behind it. Meaning, that the translucent overlay appears on top of whatever other application is currently running.

How can I make so that when the translucent activity appears, no other activity from my application is visible?

This is my main activity’s definition in AndroidManifest.xml:

<activity android:name=".AppPreferences" android:label="@string/app_name">
  <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
  </intent-filter>
</activity>

I also have translucent overlay which uses a custom theme which derives from Theme.Translucent:

<activity android:name=".AppPopupActivity" android:theme="@style/Theme.SemiTransparent">
  <intent-filter>
        <action android:name="com.app.HIDE_POPUP"></action>
    </intent-filter>
</activity>

Here is the layout for the translucent overlay:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent">

    <RelativeLayout android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentBottom="true" >

        <Button android:text="@string/button_done"
                android:id="@+id/doneButton"
                android:layout_alignParentRight="true"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">
        </Button>
    </RelativeLayout>
</RelativeLayout>

And the service:

<service android:name="AppService">
  <intent-filter>
    <action android:name="com.app.AppService" />
  </intent-filter>
</service>

To display the transparent activity I run the following in the service:

Intent intent = new Intent(this, AppPopupActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
this.startActivity(intent);

Thanks you for your help

  • 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-25T20:11:26+00:00Added an answer on May 25, 2026 at 8:11 pm

    Although the answer by Profete162 bellow did not work, it led me in the right direction. After more reading and experimentation, I believe the right answer is to change the main activity’s launchMode to “singleInstance” as follows:

    <activity android:name=".AppPreferences" android:label="@string/app_name"
              android:launchMode="singleInstance">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Application: This is a workshop proposal system for a conference. A user can create
application design/architecture question for a project that I am building. I have a main
My application is having two activities. In first activity, I have one button and
Application.Run(new Main()); This line gives TypeInitializationException was unhandled after I switched from 3.5 to
Application : Nerddinner. This SP is for an inserting password for newly created User.
Application : HTA (therefore IE) This is an application that uses SendKeys to populate
An application I have recently started work on has to register two dll's, because
Application stores configuration data in custom section of configuration file. This information is used
The application I'm currently writing is using MVVM with the ViewModel-first pattern. I have
application = webapp.WSGIApplication( [(r'/main/profile/([a-f0-9]{40})', ProfileHandler)], debug=True) The regex in the above parameter will not

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.