开发者

How to change ImageView source in Activity onCreate

I am working 开发者_如何学JAVAon a android app and I have 3 diff images in my res/drawable and I would like to change which images gets displayed from writing code in my OnCreate in the Acitvity. can this be done?


Its very easy to set the change the image of an imageview at runtime:

imgView.setImageResource(R.drawable.newImage);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜