SelectableListView - Make selection work!

The touch screens brought simplicity to our lives. We can scroll, zoom and click with just a simple gesture, using our fingers. Showing it to me 15 years ago, would’ve make me think that’s an act of pure magic!

However, it brought lots of issues regarding the handling of touch events with other inputs, like keyboard or trackball. With keyboard, we can just press the Up and Down keys to select different items, and afterward hit “Enter” to click on the selected item, making it our “final” pick. How can we do that in a touch screen? If pressing an item on the list perform a “Click” action, how can we perform a “Select” action? The Android OS developers thought about that, and decided to create a mode, called “Touch Mode”, which handles focus and selection of items differently. More about it on the Android Documentation. Long story short - they chose to ignore the “selection” of list items in touch mode!

Their decision to make touch interaction simpler for the developer, limits the power of ListView (The old “Simplicity <-> Control” trade-off. Apple is well known for choosing the first approach most of the times). As I needed to make such Selectable-List, I had to find the right way, using the components given to me. The user-experience I was looking for, was that each click on a list item will “select” it, and there will be a different button to press in order to finalize my selection, like a “Set” button under the list itself.

Read more -->

Boot

Hello! And welcome to my blog!

Here I’ll share some of my adventures as a software developer.

If you want to know more about me, you are welcome to enter my “About” page, here on this blog.

On this blog, I’ll present all kind of stuff that I did, during all my years as a programmer. Comments are MORE than welcomed! I believe that software engineers should never stop learning, so I’d like to hear if you have found problems or even have better solutions than those I’ll post here. It can be a learning experience for all of us.

I’m sure the posts here will benefit both beginners and advanced developers. Initially, I’ll mainly write stuff for the Android platform, because that’s my job, but that’s not all. I have lots of side projects on other platforms, so…stick around!

Follow me on Twitter @udinic, to get updated about new posts, and read my interpretation to life.

C ya ;)