0

I got a ListView with TextView in it.

Upon Clicking the ListView Item, I want to add a Layout(.xml file) with a single ListView item pushing the next ListView items below. The layout is just a ListView item with TextView and a Button.

Is it possible to generate such a scenario ??

Thanks,

Siva Kumar

Siva Kumar
  • 893
  • 4
  • 14
  • 28

1 Answers1

0

What you need to do is get the adapter from the listview and add items to this adapter. You can refer to the following question asked here previously

Dynamic ListView in Android app

Community
  • 1
  • 1
Josnidhin
  • 12,469
  • 9
  • 42
  • 61
  • But I dint understand that code completely !! can you just briefly tell what are resource files there ?? – Siva Kumar Apr 11 '11 at 07:40
  • Are you referring to CustomAdapter constructor params? If yes checkout ArrayAdapter in android at http://developer.android.com/reference/android/widget/ArrayAdapter.html#ArrayAdapter%28android.content.Context,%20int,%20java.util.List%3CT%3E%29 – Josnidhin Apr 11 '11 at 09:43