I want to create a transparent Activity on top of another activity.
How can I achieve this?
Along with the gnobal's above solution, I had to set alpha to 0 in the layout file of that particular activity, because on certain phone (Redmi Narzo 20 pro running on Android 10) a dialog portion of the screen was showing with the screen that was supposed to be transparent. For some reason the windowIsFloating was causing this issue, but on removing it I wasn't getting the desired output.
Steps:
Add the following in the style.xml located under res > values > styles.xml
Set the theme of the activity with the above style in AndroidManifest.xml
Open your layout file of the activity on which you applied the above style and set it's alpha value to 0 (android:alpha="0"
) for the parent layout element.