2

I have a layout over which I have created another layout which is opaque, I wanted to make a part in the upper layout transparent i.e. I wanted to make a hole in upper layout in order to view the lower layout.

Aditya Borde
  • 1,227
  • 2
  • 12
  • 31
  • Your question is very unclear Aditya. Please provide details. Layout in themselves are transparent unless you provide them with some background. Are you taking about an imageView with a hole inside it? You got to make a `.png` image file for that. – Srujan Barai Dec 06 '15 at 11:30
  • the best thing you can do is to draw the shape you are trying to make and put it in your question, so others could understand what you want and help you – Netero Dec 06 '15 at 11:37
  • @mino23 I want to create a showcase view effect. For that I have created a fullscreen dialog and have loaded it with a layout which is opaque. Now in this layout I would like to create a transparent hole so the background layout is visible – Aditya Borde Dec 06 '15 at 11:43

2 Answers2

0

Create a circle shape in XML and add an alpha channel to its background. Then add that circle shape on top of the background layout.

zulkarnain shah
  • 971
  • 9
  • 20
0

use alpha attribute inside the layout in which you want to do transparent

 android:alpha="0.5"
Pavan Bilagi
  • 1,618
  • 1
  • 18
  • 23