A
A
Artem2012-11-23 19:47:30
Android
Artem, 2012-11-23 19:47:30

GridView, custom adapter and multi-selection?

I have a GridView. Each of its cells is a custom View, which is processed by a custom adapter. You need to make it possible to select multiple items. I don’t want to do checkboxes, I want that when you click on a cell, the cell changes color. It seems that I met that you can set 3 drawable resources for such a case for different states. But now I just can’t find where I met it ... Either I misunderstood something then. Poke your nose, please, how is it done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mik_os, 2012-11-24
@bartwell

developer.android.com/guide/topics/resources/drawable-resource.html#StateList
There is an android:state_selected state.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question