android - Is it possible to make a complex ListView's divider? -


is possible make divider drawable consists of 3 images - 2 ends of lines , middle should stretch. idea make @ layout - have ends fixed size - wrap_content , middle part stretched.

is possible - make in xml drawable or programmatically?

thx in advance

like pskink said, can use 9patch drawable divider. convert bitmap 9patch, use draw9patch utility in tools directory in android sdk. drag bitmap draw9patch app window, draw black line on top of stretchable area (on topmost pixel line). once done, save bitmap 9 patch (e.g. your_divider.9.png) , use drawable listview:

<listview     android:divider="@drawable/your_divider"     ...     /> 

more info on 9-patches available here: http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -