Transparent divider in a listview
Try this:
color.xml: (res > values > color.xml)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<drawable name="transperent_color">#00000000</drawable>
</resources>
Now,use it like:
setListAdapter(new ArrayAdapter<String>(this,R.layout.news,news));
ListView lv=getListView();
lv.setDivider(this.getResources().getDrawable(R.drawable.transperent_color));
lv.setDividerHeight(20);
Can't make ListView Background transparent in Android 2.2
Question necromancy (i was having the same issue and googling):
The answer may be in this question, i.e. also set listSelector to make the focus color transparent.
Android: Transparent Colored ListViews with Background
Add following property in ListView...
android:cacheColorHint="#00000000"
it is for transparent background of ListView.
More detail see Here.
Related Topics
Eclipse Can't Find Android.Support.V4.Widget.Swiperefreshlayout
How to Add Padding Between Menu Items in Android
How to Configure Gmail in Android Emulator
Captured Photo Orientation Is Changing in Android
Supportmapfragment Does Not Support Androidx Fragment
Input Has Different Style on Focus
Android Studio - Processdebugresources Failed
Emulator: Warning: Quick Boot/Snapshots Not Supported on This Machine
Disable The Swipe Gesture That Opens The Navigation Drawer in Android
Boot Broadcastreceiver Does Not Work on Xiaomi Devices
Android Clickablespan Not Calling Onclick
Add Maven Repository to Build.Gradle
Shaking/Wobble View Animation in Android
Using Picasso Library with Listview
Does Android Webview Browsers Support HTML5 Features
How to Keep The Oauth Consumer Secret Safe, and How to React When It's Compromised