Search This Blog

Tuesday 26 March 2013

How to make ListView Divider transparent in android?

ListView has strong support for customizaton. Generally, we need customize divider in listview to seprate each row. But some times we need divider with transparency. Divider occupies the place but with no backrgound, it seems like transparent space between the rows of ListView.
 
mListView.setDividerHeight(10);
mListView.setDivider(getResources().getDrawable(android.R.color.transparent));

mListView is the instance of ListView. These two line will create divider with white space

No comments:

Post a Comment

Feedback always help in improvement. If you have any query suggestion feel free to comment and Keep visiting my blog to encourage me to blogging

Android News and source code