Ended up grabbing the nine-patch image (which is list_selector_background_focus.9.png) and adding it to my own drawables. Not the approach I'd be proud of, but it works.
On May 7, 2:07 pm, alex <gsm...@gmail.com> wrote: > Dianne, thanks for the details. > Seems like the only option I've got is finding > list_selector_background in the sources and seeing if I can create a > similar drawable that won't depend on focus state. > > On May 7, 12:47 am, Dianne Hackborn <hack...@android.com> wrote: > > > View takes care of updating the drawable state as appropriate. There are > > methods on view you can override what it sets, but I don't think there is > > any API you can call to just force it to something. > > > On Wed, May 6, 2009 at 2:04 PM, alex <gsm...@gmail.com> wrote: > > > > Ok, from pure conceptual point that IS selection. Anyways, don't think > > > it's related to my initial question here. > > > > On May 6, 11:33 pm, Romain Guy <romain...@google.com> wrote: > > > > If you are using this drawable for something else than indicating a > > > > selection, I totally disagree. > > > > > On Wed, May 6, 2009 at 1:30 PM, alex <gsm...@gmail.com> wrote: > > > > > > Sure. But in my particular case I think setting the background to > > > > > standard orange is better than introducing a custom color/drawable. > > > > > > On May 6, 9:53 pm, Romain Guy <romain...@google.com> wrote: > > > > >> Taps should always cause focus and selection to disappear,. > > > > > >> On Wed, May 6, 2009 at 11:49 AM, Jeff Sharkey <jshar...@android.com> > > > wrote: > > > > > >> >> When user selects a TextView it 'slips' (which is indicated by > > > > >> >> background color change) and the user is expected to select(tap) > > > > >> >> another view then. Not every tap should lead to the first view > > > losing > > > > >> >> 'focus'. That's the motivation behind setting background drawable > > > > >> >> programmatically. > > > > > >> > Ouch, this is actually more of a touch mode question. When the > > > device > > > > >> > goes into touch mode, there isn't a visible concept of focus in > > > > >> > ListViews (when you scroll the list, any highlighted item reverts > > > > >> > back). > > > > > >> > You might be looking for android:focusableInTouchMode, but this > > > isn't > > > > >> > used many places on the platform. > > > > > >> > -- > > > > >> > Jeff Sharkey > > > > >> > jshar...@google.com > > > > > >> -- > > > > >> Romain Guy > > > > >> Android framework engineer > > > > >> romain...@android.com > > > > > >> Note: please don't send private questions to me, as I don't have time > > > > >> to provide private support. All such questions should be posted on > > > > >> public forums, where I and others can see and answer them > > > > > -- > > > > Romain Guy > > > > Android framework engineer > > > > romain...@android.com > > > > > Note: please don't send private questions to me, as I don't have time > > > > to provide private support. All such questions should be posted on > > > > public forums, where I and others can see and answer them > > > -- > > Dianne Hackborn > > Android framework engineer > > hack...@android.com > > > Note: please don't send private questions to me, as I don't have time to > > provide private support, and so won't reply to such e-mails. All such > > questions should be posted on public forums, where I and others can see and > > answer them. > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---