Getting item on a ExpandableListView

by Alessandro Pellizzari » Sun, 14 Feb 2010 01:44:52 GMT


Sponsored Links
 Hi all,

it seems nobody ever documented ExpandableListViews, and I am going
crazy... I tried for at least 3 hours, now. :/

I have overriden onChildClick, and it gives me groupPosition and
childPosition, but it seems there is no getItemAtPosition(groupPosition,
childPosition) and no other way to get the correct item.

How do I get the item?

Thank you very much
Bye.


--



Getting item on a ExpandableListView

by TreKing » Sun, 14 Feb 2010 02:35:35 GMT


 



Yes, they did:
 http://developer.android.com/reference/android/widget/ExpandableListView.html 



How do I get the item?


If you read the documentation, you may find this function:

 http://developer.android.com/reference/android/widget/ExpandableListView.html #getExpandableListAdapter%28%29

which will get you adapter that has the data in the ExpandableListView. That
in turn has a getChild(group, child) function:

 http://developer.android.com/reference/android/widget/ExpandableListAdapter.html #getChild%28int,%20int%29

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
 http://sites.google.com/site/rezmobileapps/treking 

--


Sponsored Links


Getting item on a ExpandableListView

by Alessandro Pellizzari » Mon, 15 Feb 2010 21:36:04 GMT


 Il giorno sab, 13/02/2010 alle 12.34 -0600, TreKing ha scritto:



I meant: no examples, no directions, no blog posts, no manuals. I only
found a german book on google books, but I could only see 2 pages of it
and didn't get to the point. :/

All the ListView examples use ListView.getItemAtPosition(), but nowhere
I found documented that this is a "wrapper" around the adapter
(inherited from the AdapterView, in fact). :/

This led to my confusion, as ExpandableListView has no such "facility".



Thank you very much. Now I understand how the ListViews "think". :)

Bye.


-- 
Alessandro Pellizzari

--



Other Threads

1. Nobody can stop Androids MediaRecorder...

Hi!

I had a very tiny acttivity for audio recording:

recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile(filename);
recorder.prepare();
recorder.start();

after a button click:

recorder.stop();
recorder.release();

Worked from the first beginning, a few hours later and NO changes (I
checked git two times!!!) the emulator hangs in the recorder.stop()
forever!!!

Anybody any ideas whats that about? Started the emulater, installed/
removed/installed the app, packaged the app, started via Eclipse
de{*filter*}, for 1.6, for 2.1 - all with no changes. Android NEVER comes
back from the recorder.stop()!!!

Thank you VERY much in advance,
regards
Anton

-- 

2. unable to install android SDK through Eclipse android AVD manager

hi
 I ma unable to install android SDK through Eclipse android AVD
manager
 When i was clicking on available packege it gives me error like
 Failed to fetch URL http://dl-ssl.google.com/android/repository/repository.xml,
reason: dl-ssl.google.com

 Even i have tried this withput htttps
But it doesn't work
Please help me if anyone


Thanks
Gajgeet

-- 

3. question about Translucent&Wallpaper from Api demo

4. How does ATK generate its list of apps?

5. Android 2.2, Bluetooth headset profile mode

6. GPS Location time confusion

7. Android Scrollview problem in listview