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.
You should use android:shape="rectangle" instead of android:shape="line" to make it work on every android version... (also change stroke to solid)
android:shape="rectangle"
android:shape="line"
stroke
solid
Have fun!