Create a new selector (see 
http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList)
for the item, and then configuring the colour/background values
depending on state. By state, I mean, your item could be
'Checkable' (i.e. only a single item in the whole GridView can be
checked at a time) and then when it's tapped, set it to checked, and
the appropriate value in the selector would be chosen. Alternatively,
you could use the item's .setEnabled() method and do something
similar.

You may also need to be aware of the android:duplicateParentState
attribute.

On Jan 20, 6:10 am, "[email protected]" <[email protected]> wrote:
> I would like to make the blue border around a gridview item remain
> highlighted after clicking on it as a reminder to the user which item
> was slected while making the second choice. I have tried a number of
> methods from the View class and none of them seem to have any effect -
> the border disappears after a short while. Any ideas how to do this?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to