tags:

views:

25

answers:

1

In the Android Mail application, when you click the checkbox next to an inbox message, a little bar with buttons (mark unread, delete, star) appears at the bottom of the screen. I'd like to do something similar, but I don't think I'm going about it the right way.

What I've done is add a LinearLayout below my ListView and marked the visibility GONE. When a user clicks a checkbox next to a list item, the LinearLayout's visibility is marked VISIBLE. Unfortunately, checkboxes stop working. By this I mean the skin on the checkbox does not change from unchecked to checked; and I can't figure out why.

(...or rather, this is the way I HAD it. I removed it once I couldn't fix it and, since trying to add it again, it just crashes, but I digress)

What is the best way to architect what I'm trying to do?

+2  A: 

Check out the source of the AndroidMail app that you're referring to. I was able to re-use the CursorAdapter included in MessageList.java with very little modification for one of my apps.

QRohlf
Thank you for pointing me to it
Andrew
It looks like they're doing the same thing I am, with some animation added. Though I still have my original problem. When I click the checkbox, the checkbox does not re-skin to the checked state. If I click it again (after my popup is now showing), it will check. I wonder if showing the popup messes with indexes in a weird way?
Andrew
I have it all working. Thank you.
Andrew