简体   繁体   中英

Either remove ListView divider colour so transparent or set background without redrawing pixels. - Android

I have a quite easy question here. Can you remove the ListView divider colour as so it is just left transparent as the default app background has a slight gradient to it and looks strange if you set the divider to a certain colour of the background as it matches some places and doesn't in others.

My other question if this is not possible is that is it possible to set a custom background for the app without making the app redraw the pixels adding extra GPU Overdraw. If you do it the normal way which is making the app set a background using android:background="#e6e6e6" then the pixel has another layer added onto it leading to less performance. That is why I would to set the master colour for the style preferably although I am somewhat sure this isn't possible.

Just set the divider color to transparent:

android:divider="@android:color/transparent"
android:dividerHeight="0dp"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM