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 like to remove my graphicss from my Image Resource so: ((ImageView) v.findViewById(R.id.imageViewHeart1)).setImageResource(null); or something, how can I do this? 回答1: If you remove image then used ((ImageView) v.findViewById(R.id.imageViewHeart1)).setImageResource(0); 回答2: Use ImageView.setImageDrawable(null); or simply View.setVisibility(View.INVISIBLE); 回答3: Try add transparent png with 1px width and