I have to show a list with different type of Views. So I have to define a ListView with an Adapter where I have to inflate multiple views. I have gone through example given,
You can do that by overriding the Methods getViewCount()
and getItemViewType(int position)
In the first you just return the amount of different Views you have.
In the second you return a unique Identifier for each different View.
In your getView()
Method you check then for the View Type and inflate the right Layout for it.
More info about that topic: Android ListView with different layouts for each row
Android ListView with different layouts for each row