?
Solved

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

Posted on 2011-04-26
1
Medium Priority
?
739 Views
Last Modified: 2012-06-22
Hello,

         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!
0
Comment
Question by:errang
1 Comment
 
LVL 8

Accepted Solution

by:
shaunak earned 2000 total points
ID: 35481608
Set an onclick listner to your list and you can get the value of the selected item.
spinner.setOnItemSelectedListener(
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

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
Suggested Courses

850 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