android - Rectangle shape as background causes black background -
i create border around rablerow. using following shape background.
bg_stroke_dotted_right
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:top="-4dp" android:left="-2dp" android:bottom="-4dp" android:drawable="@drawable/stroke_dotted"> </item> </layer-list>
stroked_dotted drawable
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <solid android:color="#000000" /> <stroke android:dashgap="4dp" android:dashwidth="2dp" android:width="2dp" android:color="@color/greydark" /> </shape>
i not understand why using "bg_stroke_dotted_right" bg - files background black color. add "bg_stroke_dotted_right" bg - bg turns black.
<tablerow android:id="@+id/tablerow2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/bg_stroke_dotted_right" >
in shape try :
<solid android:color="#00000000" />
in case first 2 "00" alpha of colors, , "00" meand transparent.
enjoy!
Comments
Post a Comment