Search This Blog

Support my cause by downloading

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
Android News and source code