I tried to found a method, but no results. I want a ListView like below, and when I click on an element, like "Word", it'll be like this picture :
Is it possible ?
I tried to found a method, but no results. I want a ListView like below, and when I click on an element, like "Word", it'll be like this picture :
Is it possible ?
What you described is what an ExpandableListView does. Basically it's like a listview so you'll still have to create your own adapter, but it lets you click a row to inflate a bigger item that you can then stuff your text into.
I would recommend creating your own class that extends ArrayAdapter
or BaseAdapter
. Then you can make use of the getView()
method that gets called every time the screen gets redrawn for the user. You can then design multiple views for each selection and choose which one to display in the getView()
function. So when the user selects an item, you set a flag in your custom class, and then notifyDataSetChanged()
and you're good to go!