Reputation: 11780
I have a shape that allows me to have a white background with a border.
<?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="#000000" />
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
android:top="1dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle" >
<solid android:color="#FFFFFF" />
</shape>
</item>
</layer-list>
But I need a shape with a see-through white background and a black border. If I change #FFFFFF
to #80FFFFFF
, then the black of #000000
shows through. How do I get this right?
Upvotes: 0
Views: 1124
Reputation: 31
Try this
<item>
<shape android:shape="rectangle" >
<solid android:color="#000000" />
<stroke android:width="1dp"
android:color="#FFFFFF" />
</shape>
</item>
Upvotes: 0
Reputation: 11780
I got the answer
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="#80ffffff" />
<stroke android:width="1dip" android:color="#000000"/>
</shape>
Upvotes: 1