Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List View In Libgdx

I have arraylist of powerUps and I want to display as a List view and whichever row user selects get that particular power for specific time. All thing is done except I am not able to display arraylist items on listview in libgdx. I searched a lot but didnt get any idea. I want something like this.

enter image description here

like image 879
Nishant Anindya Avatar asked Dec 24 '13 12:12

Nishant Anindya


1 Answers

If you want to use native android listview, you should refer this

But changing activity may not be such a good idea in most cases. So List class in scene2d would be a great choice here. You can simply initialize it with array of items and have a selection change listener to perform power-up selection. For more, refer this.

like image 93
Tanmay Patil Avatar answered Oct 02 '22 05:10

Tanmay Patil