How do I create a ListView with dashed / dotted line dividers in Android?

后端 未结 3 2139
攒了一身酷
攒了一身酷 2021-02-13 17:01

I managed to figure out how to create a custom shape (with a dashed stroke) by creating a file called dash.xml inside of the /app/res/drawable/ folder:

3条回答
  •  不知归路
    2021-02-13 17:15

    You also need android:dividerHeight. Shapes are variable size, and right now you have a zero-height divider.

提交回复
热议问题