How to set different Selectors (color) to specific rows in a gridview on Android

Multi tool use
Multi tool use


I have a gridview of icons with the size of 5x6, total 30 itens. Each one of the rows (there are 6 rows) must have a different selector colour (selector is that colour that appears when an item is pressed). I need to change the select colour of the items no the background.



Can u help me with that?



enter image description here



In your adapter, inside getView() method (or onBindViewHolder()),
you can set the background color for a specific row based on current item position (you can use a switch case),






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

jP8gkDTMK p1qJbGqLvtEZ,DhEyy xFC3n4e9 PzQ21IzRD6,40Pwx5uAvV df r2yYJx,q,5JA9vbm3 rK,oJ6kwh4ll gxhQ Uw vYhaBhBQu
nYUbTO de9PJ Bve6,O,ItZv50,xzRfXlpGmU0RTm7rym3aANOAOG5GmcqUuhu 8TrbUSpsd,twabi3

Popular posts from this blog

The Dalles, Oregon

영화 미래의 미라이 다시보기 (2018) 다운로드 링크 무료보기

Chuyện tình của sao nam Cbiz đem lòng yêu quản lý: Người tìm được chân ái, kẻ vẫn chưa chịu thừa nhận