I have an listview and the individual items in the listview are inflated from custom layout. I do not have any problem with that. My problem is when I put a background to the item, it is rendered very strange, it is like re-sized and and it looks ugly:
I put different values for the height of the item like wrap_content, like the exact height of the real image in px, I tried values in dip but nothing helps. The original image it is ok, it looks just like it should but when I put it as background for the item it looks ugly. This is not first time I experience something like this. Somethimes putting wrap_content helps but not always. I do not understand the background of the problem why is this happening?
Why sometimes when I put some image as background even have some gradients and so on, it works just perfectly and why sometimes it don't?
I had experience where I had linear layout with background and when the size of the layout was wrap_content of let say 77dip it looked very ugly (with scratches in the middle) and when I put 78 or 76dip height the background looked very nice, again on 73dip the scratches in the middle ware shown. I never understand this strange behavior, can someone please clarify this and what is the best practice for doing things like this.
I read multiple screen support but I never meet solution for this kind of problem I never even read that someone else have experienced something like this.