android - Custom listview selector / drawable dimensions? -
is there way can set listview selector custom drawable occupies portion of item view? have made drawable rectangle , set selector, i'm having difficult time getting size properly. picture shows have (1) , desired effect (2).
got - decided set selector drawable shows border on 1 side, , messed around insets no avail (for reason top , bottom not working properly). made layer list , offset top layer right few dp.
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:top="0dp" android:left="0dp" android:bottom="0dp" android:right="0dp"> <shape android:shape="rectangle"> <solid android:color="@color/coloraccent"/> </shape> </item> <item android:top="0dp" android:left="5dp" android:bottom="0dp" android:right="0dp"> <shape android:shape="rectangle"> <solid android:color="#ffffff"/> </shape> </item> </layer-list>
Comments
Post a Comment