Note: Android3.0 above system starts to support hardware acceleration feature hardwareaccelerated, which is enabled by default. When one of your activity uses the "dashed" effect, you must set the Hardware acceleration propertyof the activity in the Androidmanifest file to: Android: hardwareaccelerated= " False, otherwise the dashed effect is not displayed. The specific reason is not very clear.
Using shape to draw line, very simple, I can soon write a line type of shape file, and then set to a view of the background property, this thought the effect of the horizontal line will come out, but run a few times is not displayed. Later on the Internet to find, are some talk about how to define line, no running effect to see, the developer's official website is just a simple summary of the use of line method. Originally almost called the artist to cut a picture for me, and finally let me find this article, may want to FQ Browse. Here is the definition of line, and use some of its points of attention, after reading, suddenly enlightened, the previous definition made some changes, can be normal display. Articles such as the next, are English, but are still simple, not too difficult to understand.
Android uses shape to draw lines