I have the following code:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke android:width="1dp"/>
<size android:height="1dp" />
<solid android:color="#FFF"/>
</shape>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background ="@drawable/line"/>
I have two questions:
1) In order to set the color of the line, you need to define android:color
on the <stroke>
. The <solid>
element is for the background.
2) You can set the opacity of the shape by using color values with an alpha layer, aka #ARGB. In your case, maybe #7FFF.