in my layout I am trying to draw a DOTTED LINE.for drawing a horizontal line i am defining a view in my layout file.
I was pulling my hair on this issue too until I figured out there is a bug in the latest versions of Android when rendering lines like this.
This bug can be circumvented by adding android:layerType="software" to the view which is using the dotted line as a background.
Example:
dotted.xml:
layout.xml: