1. Introducing Channels - a new way to chat with other Android users!
    Dismiss Notice

onListItemClick()-how to match efficiently result String with various options


Last Updated:

  1. AndroiDev

    AndroiDev Member This Topic's Starter

    Joined:
    Jun 9, 2010
    Messages:
    8
    Likes Received:
    0
    When you have a list activity and in onListItemClick() you need to obtain the selected item and then match it against various options, what is the efficient way to do it? switch case cannot be used since I want to match Strings. Is a very long if-else if ladder the only way to do it?
     

    Advertisement

Share This Page

Loading...