jul jul - 1 year ago 263
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 Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download