I need to display an image from server on a button. Could anyone help me please.
Asked
Active
Viewed 718 times
2 Answers
0
Load the image from web and use it as background of Button. Or you can use ImageButton and use the loaded image as image resource. Here is an example to load image from web How to load an ImageView by URL in Android?

Community
- 1
- 1

Walid Hossain
- 2,724
- 2
- 28
- 39
-
-
-
yourButton.setImageBitmap(myBitmapFile); is not working. Should I have to add other jar files. – vivek Nov 04 '11 at 07:34
0
This example could help you:
http://en.androidwiki.com/wiki/Loading_images_from_a_remote_server
You just need to delete the random file names and change the button ids.

NCode
- 2,758
- 1
- 16
- 25
-
-
For displaying Images on a button, you need an ImageButton, which is a subclass of the ImageView used in the tutorial. http://developer.android.com/reference/android/widget/ImageButton.html – NCode Nov 04 '11 at 07:32