I need to display an image from server on a button - android

I need to display an image from server on a button.
Could anyone help me please.

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?

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.

Related

how can i make listview itmes open meny url in webview?

I tried several times to do an example like the picture in android but failed
Is it possible to help with code example?
To make this applicationenter image description here

How to get the src from an ImageButton in Android?

I'm building the Activity to take information on the users pet and make a sqlite database entry with it. I want to be able to take a picture and store the src as one of the rows in the entry.
I currently have an ImageButton displaying a default picture from drawable, but how do I extract the src from the ImageButton?
I figure if I can do that then it'll be easy to make the button clickable so the user can set their own (then when they hit the save button, it'll grab the src of the new pic instead, otherwise if they don't click it the default pic will get saved)
Please Check the Below answer may be helps you.
Bitmap bitmap = ((BitmapDrawable)imagebutton.getDrawable()).getBitmap();

add Information(text or csv) to image in android

I am trying to add few things like names, places to images. The idea is to have them sorted according to name or place when the users uses it.
I have the code working to take pictures and save it to the Phone's memory.
How can i add this Tag of information in my code?
Or even how can i add metadata to an image??
Off the top of my head, what you could do is create a database and have in three fields:
Names
Places
Image path
Use a GridView to show the images in your app(and load them images from the database). On GridView ItemClick you could prompt the user to add in tags into the image, later on you could use these fields to sort the image in you application.
Hope this helps.
I found what i was looking for we can add extra information to an image using ExifInterface. Thanks

How to set selected effect when click on any image button same as iphone?

I have one screen with some image buttons and image view. when user click on these buttons or image view i need to show selected effect not replace any image instead of these. only selected dark shade effect on button or imageview same as iphone. How it's possible ?
i have not any selected image source , i checked these code ...
http://developer.android.com/reference/android/widget/ImageButton.html
But here we set another image on pressed event.
Anyone know any property of android to directly set select dark shadow
effect without image ?
Please anyone suggest how its possible ?
Thanks
you can use setAlpha method of imageView class to do this.
imgView.setAlpha(90);
http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList
Thats the link for adding images to show different state of buttons. You create a xml file for this and set this file as the background for the button.

generating captcha

Does anyone know if there is any library available for generating captcha which is possible to implement in android application so the captcha appears in the activity?
Thank you.
USe the open source JCaptcha from http://jcaptcha.sourceforge.net/
yeah it is simple to implement the technique of capcha in android or in any other plateform . what you have to do is to put some images into the drawable , put an ImageView right above you EditView and linked those images with an Array or any collection in which you saved the correct text of the images ... then on button click get the ID for the random image and verify it with the saved collection of text .
Have you looked at recaptcha?

Categories

Resources