ListView divider not showing in Android 5
问题 I have a simple listview for which I have defined a custom drawable for the divider. I have defined the divider height to be 1dp. The listview is within a fragment. <shape android:shape="line" > <stroke android:color="@color/custom_color" /> <gradient android:height="1dp" /> </shape> It works great for all Android versions except L. Anything I'm missing? 回答1: You should use android:shape="rectangle" instead of android:shape="line" to make it work on every android version... (also change