0

Romain Guy himself states that TouchMode does not have any selection or focus in this link. I used android:listSelector="?android:colorPressedHighlight" for a listview and the items I touched retained a blue background. How does this work if TouchMode doesn't have selection?

If listSelector is not the prescribed way to show selected items in touch, how exactly is it done in the youtube app (the red bg in the attached image).

enter image description here

1 Answer 1

0

listSelector on ListViews are for phones with bezels/D-pads or GoogleTVs with D-pads

enter image description here

Notice that once you touch them, they remain highlighted. That's because the touch event is mapped to a click event and the selection stays highlighted because that's the only way to keep track of what you've selected (assuming your screen is not touch enabled and for instance you're only controlling the device from the Directional Pad of your remote control).

enter image description here

3
  • The last four lines don't make any sense to me!! Can you explain in simpler words? Also please have a look at my edit
    – x-treme
    May 1, 2014 at 0:10
  • 1
    The YouTube example doesn't follow the Android TouchMode conventions of selectors. If it did, you would touch it, and then it would change the highlight of the button, and then the highlight would disappear as soon as your finger lifted itself from it. The UI of YouTube seems perfectly familiar to you, but it's only familiar because most of the List UIs we're familiar with were built initially on top of non-touch PCs and non-touch ATMs. Android made a point of getting rid of that UI convention for its touch devices (but ListView still utilizes that convention for backward compatibility). May 1, 2014 at 0:22
  • After all, there are still Android phones that are being made without a touch screen (mostly for the Chinese Market). The D-pad interface is still very important for accessibility reasons for disabled people. Most Android/Google TVs do not have touch screens (yet). And applications like YouTube have started to blur the line between being run on Android phones and run on Televisions (so sometimes, it has a good touch screen and sometimes it doesn't). May 1, 2014 at 0:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.