While working over listView I have came across a trouble situation.
Actually I am having a image view defined in layout that is to be inflated,
And I am doing so by adapter with my own bean class XYZ.
Now what I want is I’m checking the variable pic of the bean.
If no image there ,the image view is to be hidden or gone,
When the “pic” is available it should show the list,
But the ListView getView is called everytime I scroll,,, The image appear and disappear abruptly on list scroll,
Please help me put of the situation.
I want ImageView to be displayed when it is available. And hide it when pic tag is ” ” (empty)
You should create a transparent image and put it in dise the drawable folder
add a condition in side the getView method
if (tag==—-)
ImageView.setImageDrawable(R.Id.TransparentImage)
else
ImageView.setImageDrawable(R.Id.AvailablkeImage)
it is appear like as image is hidden in list view.
I hope this is help.