jul jul - 1 month ago 20
Android Question

How to set width of ListView divider?

How can I set the width of my custom ListView divider, in order to have it smaller than my row width?

Answer

Make a 9 patch png that has transparent pixels on the left and right. For example, a 53x4 .9.png that has 25 transparent pixels either side (+ pixels to 9patch it) would stretch the 1 pixel out so there is 25 pixels either side of it.