How do you get the id/value of a child of an ExpandableListView?

Posted on 2011-04-26
Last Modified: 2012-06-22

         I was just wondering if there was an easy way to get the value/id of a child of an expandable list view... I tried searching google, but there was literally no information on this topic, and it keeps taking me to overloaded ExpandableListViews... is there a simple way to achieve this?

Thanks in advance!
Question by:errang
    1 Comment
    LVL 8

    Accepted Solution

    Set an onclick listner to your list and you can get the value of the selected item.
    new OnItemSelectedListener()
     public void onNothingSelected(AdapterView<?> parent) 
    	 	//Do nothing.     			  
     public void onItemSelected(AdapterView<?> parent, View view,int pos, long id) 
    	 moviename = parent.getItemAtPosition(pos).toString();

    Open in new window


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Recently Amazon announced their entry in the tablet device called the Amazon Kindle Fire. Some of you might have used an Ipad or have considered buying one. While they're similar in form and function in that they both have color displays with multit…
    This is an explanation of a simple data model to help parse a JSON feed
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now