On Mar 11, 6:28 pm, Jesse McGrew <jmcg...@gmail.com> wrote: > On Mar 11, 6:04 pm, Romain Guy <romain...@google.com> wrote: > > > > I'm trying to get the same behavior as Alarm Clock, where tapping on a > > > list row brings up an activity to edit the row, and the check box can > > > only be selected by tapping on the check box itself. I think that > > > precludes using multiple-choice mode for the list view, correct? > > > Indeed it does. ListView is not ready to do things like this really > > but a way to do it (much better than how it was done in AlarmClock) is > > to use a TouchDelegate for the checkbox. > > Interesting. Unfortunately I can't find any examples of TouchDelegate, > and the class documentation is confusing. > > I gather that I need to pass the bounds of the check box (relative to > its container) into the TouchDelegate constructor. Once I have a > TouchDelegate instance, what do I do with it? I see a method called > setTouchDelegate() - do I call that on the check box, the list row, or > the view group that directly contains the check box? And is that > method enough to get the touch events relayed to the delegate, or do I > need to listen for touch events and forward them myself?
Also: would it still be possible to focus the check box using the trackball? I assumed TouchDelegates were only for touch, and so the trackball would only be able to move between list rows. In AlarmClock, the trackball can move horizontally between the clock view and check box inside a row, as well as moving vertically between rows. Jesse --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---