开发者

ImageButton usage and changing pictures

  • how do you change the image of an ImageButton during runtime? for Button, you can say setText("some text") for ImageButton is there any 开发者_C百科setImage() such that I can change the image during runtime?

  • where do you place the pictures? drawable hdpi,ldpi,mdpi..what exactly is the difference between all of them?


There's an API for this http://developer.android.com/reference/android/widget/ImageView.html#setImageResource%28int%29 You can go through the documentation for more details.

You can place the images in drawable folder. For more details, have a look at http://developer.android.com/guide/practices/screens_support.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜