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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:50:28+00:00 2026-05-22T00:50:28+00:00

My app contains only one activity and I want it to be opened as

  • 0

My app contains only one activity and I want it to be opened as a small sized activity on top of the current active activity.

For example, if the app has a shortcut on the desktop and the user activates it then the main activity will open on top of the main desktop view in a small size (deviceHight / 2, deviceWidth / 2) box. If the app clicked from the app drawer the the drawer view will be visible behind the app activity.

Kind of a popup but with no parent activity.

  • 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-22T00:50:29+00:00Added an answer on May 22, 2026 at 12:50 am

    Do you mean like a Dialog? Apply a custom theme to your activity will do the trick. Android have already defined a style which will make our Activity looks like a Dialog: @android:style/Theme.Dialog.

    There are two ways to apply theme to your activity:

    1, Set android:theme attribute to the activity in AndroidManifest.xml

    This is the easiest way to apply custom theme, following is an example:

    <activity android:theme="@android:style/Theme.Dialog"
        android:name=".MyActivity"/>
    

    2, Using Activity.setTheme method

    You should pass a style resource id to this method, in your case, you can use android.R.style.Theme_Dialog. Note that you should call this method before you call setContentView so that the theme will be applied to the content view.

    public void onCreate(Bundle savedState) {
        super.onCreate(savedState);
        setTheme(android.R.style.Theme_Dialog);
        setContentView(R.layout.main);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I plan to do an app which contains only one activity and without any
i have an app widget, which contains only one imageview. i redraw that image
My jQuery Mobile app consists of a single index.html page and contains only one
A small portion of my app contains a view were people can take brief
I have an app that contains several activities...so lets say user is navigating activity
I have a TabHost activity as main activity of my app. This TabHost contains
I have a tableView with multiple sections. When a sections contains only one row,
I'm building an app that has a main Activity that takes advantage of the
Dear friends, I have created one music app. It contains some collection of albums,
I have an app which has a main activity that calls other activities on

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.