Reputation: 16780
how do you change the image of an ImageButton during runtime? for Button, you can say setText("some text") for ImageButton is there any 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?
Upvotes: 1
Views: 590
Reputation: 198
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
Upvotes: 2