开发者

Why is my drawable ListView divider stretched?

i use a drawable as my divider in the listview. my drawable is a down arrow. but when it is displayed on the screen its width stretched. i know there is a way to set divider height with , but is there a way to set its width?

<ListView android:id="@android:id/list" 
  android:layout_width="match_parent"
  android:layout_height="mat开发者_如何学Goch_parent" 
  android:divider="@drawable/down_arrow" 
  android:dividerHeight="1dp"
  android:cacheColorHint="@android:color/transparent"
  android:layout_gravity="center"
  android:layout_below="@id/title">
</ListView>


Use a nine patch image as your divider (stretch transparent pixels on both sides). You cannot set the width of the list divider.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜