Walter
Walter

Reputation: 77

Android: Create Activity not Full Screen with Transparent Background

I'd like to create an Activity smaller than full screen and having around it a transparent background.

enter image description here

Using re-size function I was able to create layer smaller than full screen, but I don't know how to create transparent background.

In my mind, if you tap on the background nothing should happen, but, in my case (simply re-sizing) activity, when you tap somewhere outside of activity, it loses the focus and disappears.

Any ideas? Many thanks!

Upvotes: 1

Views: 1144

Answers (1)

Halsan
Halsan

Reputation: 36

What about making your own style and putting:

<item name="android:windowCloseOnTouchOutside">false</item>

Upvotes: 2

Related Questions