Android transparent overlay without View

We’re not going to use ViewOverlay here. We’ll use Dialog instead.

The overlay does not show on button click. What I did was let the overlay appear when the activity is loaded.

First, create the XML file for the contents of that dialog overlay.


Then add the following code into your activity’s Java file. Please edit as needed in your project.

You might need to add lines of “import” codes yourself for the classes I used.
You might need to fill in missing @color and @dimen values yourself.


Related Posts:

Posts that may be related to "Android transparent overlay without View":


A Filipino programmer and baker. When I have time to spare, I blog, play video games, watch series (usually anime), cook dishes, draw, or spend a little time with pets. When I have the rare luxury of time, I get to travel and record song covers too! Running small-time online dessert shops Cookies PH and Catzie's Cakery.

Leave a Reply

Your email address will not be published. Required fields are marked *