How to make Activity, not covering full screen

Viewed 15954

I want my activity to take smaller area of the screen e.g. toast doesn't cover all of the screen, it is just shown over other things and rest of the contents can be seen behind the toast. But it's a dialog, and I want my screen to be shown above other things e.g. above Home Screen. Below is the idea that is in my mind.

Activity Taking Smaller Area of the Screen

Kindly, guide me if it is even possible. If possible then show me the right path.
Thanks.

3 Answers

Latest versions force a style based on Theme.AppCompat. Use this to create a quick dialog style based activity.

android:theme="@style/Theme.AppCompat.Dialog"

Related