0

I am developing an Android app and after click of a button in home screen, I want to launch an activity which will be an overlay on the home screen. The activity launched should not be in full screen but must have some padding from all ends of the screen. How can i achieve this.

Alb609
  • 57
  • 1
  • 8

3 Answers3

0

Try Fragment Dialog. I think you want something like a Popup come when you are in home screen. Fragment dialog has its own life cycle. I didn't tried but I think this what you are searching.

https://developer.android.com/reference/android/app/DialogFragment.html

Avinash Verma
  • 2,572
  • 1
  • 18
  • 22
0

Try with these and next time spend a couple of minutes searching for it before ask anything.

How to show an Activity as pop-up on other Activity?

How to open an activity in a popup window?

Make an Activity just a pop up window

Community
  • 1
  • 1
SamuelPS
  • 555
  • 6
  • 20
0

Set Your Activity Them Dialog

In Your manifest change your activity theme like this

 <activity
        android:name=".YOUR ACTIVITY NAME"
        android:label="@string/app_name"
        android:launchMode="singleInstance"
        android:theme="@style/Theme.AppCompat.Light.Dialog"
        >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
Vanraj Ghed
  • 1,261
  • 11
  • 23