I am creating a listiview programmatically. I keep a divider between listview elements.
I wish to keep a transparent divider because I have a background image to be shown. I have tried the following code which does not work. Kindly help
setListAdapter(new ArrayAdapter<String>(this,R.layout.news,news));
ListView lv=getListView();
ColorDrawable sage= new ColorDrawable(this.getResources().getColor(Color.TRANSPARENT));
lv.setDivider(sage);
lv.setDividerHeight(20);
Try this:
color.xml: (res > values > color.xml)
Now,use it like: