Android how to set a transparent image resource of a view? or Remove the image?
((ImageView) v.findViewById(R.id.imageViewHeart1)).setImageResource(R.drawable.heart);
I d lik开发者_如何学运维e to remove my graphicss from my Image Resource so:
((ImageView) v.findViewById(R.id.imageViewHeart1)).setImageResource(null);
or something, how can I do this?
If you remove image then used
((ImageView) v.findViewById(R.id.imageViewHeart1)).setImageResource(0);
Use ImageView.setImageDrawable(null); or simply View.setVisibility(View.INVISIBLE);
Try add transparent png with 1px width and 1px height.
精彩评论