I want to create a listviewitem in a listactivity.
The listviewitem will be a textview and an image.
But I have a case that there is no image to put in the imageview I will want the textview to take the whole listviewitem.
I do not want to use different XML layouts for these cases because I have same issue but with 3 images (n of the 3 can be shown).
I need some sample code for dynamic adding image views….
Also – I am using an adapter for this list…
I have no time to post code, but you could do something like this:
EDITED:
Here is one layout to use as your itemLayout: