开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜