White Border along with transparency in “LinearLayout”

tqj

New Member
I wanted to add a linear layout, having a transparent background as well as with white borders. The problem is: as far as I have googled, I can achieve only one out of both. Here's what I did: [*]Saved the following as border.xml in drawable\[code\] <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle"> <solid android:color="#FFFFFF" /> </shape> </item> <item android:left="5dp" android:right="5dp" android:top="5dp" android:bottom="5dp" > <shape android:shape="rectangle"> </shape> </item> </layer-list> \[/code\][*]my existing page layout\[code\] <LinearLayout android:id="@+id/quiz" android:layout_width="150dp" android:layout_height="120dp" android:background="#66041414" <-------- replaced it with android:background="@drawable/border" android:orientation="vertical" android:layout_marginLeft="5dp" > ...... </LinearLayout>\[/code\]I am getting opaque background, when the border was included. I wanted a final result to be like:


OShOF.jpg
totally stuck with it. Just wanted to find a way out to achieve it. Any suggestions would be quite helpful.
 
Back
Top