Questions tagged [android-imageview]

Displays an arbitrary image or a drawable, such as an icon or an xml defined graphical element.

Displays an arbitrary image, such as an icon. The ImageView class can load images from various sources (such as resources or content providers) and it will take care of computing its measurement from the image so that it can be used in any layout manager. It also provides various display options such as scaling and tinting.

More information can be found in the documentation for the ImageView class.

4273 questions
1
vote
1 answer

Viewing images and links on click

I have two questions, each similar to each other. Firstly, my app loads images from my web server. When a user clicks the image, I need it to open the image in some sort of image viewer (where you can zoom into the image and pan around). Can I also…
1
vote
1 answer

How to display other image when I scroll screen?

I have two images in drawable. I am using the ImageView to display them. However, I want to display each image individually by hand. At the first, I want to display image1.png. When I scroll left to right, it will be display images image2.png. Could…
Jame
  • 3,746
  • 6
  • 52
  • 101
1
vote
1 answer

Avoid ImageView from scaling inside a TableRow

Ive got a ImageView inside a TableRow as shown in the xml below. My problem is when ever the row height changes the image would scale up. How do I avoid this ? I have tried programmatically setting LinearLayout.LayoutParams to no avail. Also tried…
nixgadget
  • 6,983
  • 16
  • 70
  • 103
1
vote
2 answers

Error writing serializable object (bitmap include)

I want save a Contacto's item on a RecyclerView from a NewContact class by intent. In my Contactos class I have a Bitmap and I know this is the error becuase, before, without bitmap works it. What's wrong? Contactos class: import…
1
vote
2 answers

ImageView onClickListener on Android Api 5.0 not working

I have set an OnclickListener to an ImageView and when clicks performs an asyncTask, it works well on devices running below Api 5.0, but do not work at all in Android Api 5.0 devices. Async Task: public class SendName extends AsyncTask
1
vote
7 answers

Image position is not able to set center with scale type matrix

I have image view in xml and I want to try to set image in center: My current code:
user3997016
1
vote
2 answers

How can I change default ImageView color based on EditText length() test?

I have an Icon that defaults to the color white, using an ImageView and drawable. I want the color to change to black when pressed. When an EditText line gains text (because the user enters some data on the line), I'd like the icon to change to…
AJW
  • 1,578
  • 3
  • 36
  • 77
1
vote
0 answers

How to add limitation to zoom in & zoom out for imageview android

The problem with this code when I run it the image zoom in = Infinity! and zoom out = Infinity! I want to add limit for zoom in & zoom out .. help please Regards. This is my class code : Map.java public class Map extends Fragment implements…
1
vote
1 answer

Android: OutOfMemoryError when playing videos and images

I'm writing an Android app, which plays both images (shown for 10 sec) and videos. I used a layout with a VideoView and an ImageView for that. Layout XML below:
1
vote
3 answers

set background color for imageview doesn't work

I am trying to change ImageView background when clicked(like Duolingo) Here is my code from fragment : @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { …
1
vote
1 answer

Android FrameLayout/ImageView Rotation issue

I am rotating a FrameLayout which contains an Imageview with image.When I add another Imageview on that rotated FrameLayout than the added imageview also get rotates by default as usual. To prevent this as I need the added ImageView not to be…
1
vote
1 answer

Why first click on the ImageView is not working?

I have read through other posts. I can't able to find the solution still. I tried putting android:focusableInTouchMode="false" android:focusable="false" not worked. I have included android:clickable="true" not worked. In Java code, I have included…
Dinesh Ravi
  • 1,209
  • 1
  • 17
  • 35
1
vote
0 answers

Zooming example does not finish zooming

I am trying to zoom an image in and out using android's example below: http://developer.android.com/training/animation/zoom.html This example works when the original image's container is a square, however not when the image is a rectangle. When the…
1
vote
3 answers

Android+Java get image from URL on server and pass as string to client: Base64 decode and encode not working

In Java server I fetch image from external service URL like: InputStream in = new java.net.URL(imageWebServiceURL).openStream(); String resultToCleint = org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString(IOUtils.toByteArray(in)); Then…
michael
  • 3,835
  • 14
  • 53
  • 90
1
vote
3 answers

LinearLayout of three elements with uniform occuped space

I want to create a horizontal linearlayout with two button and one imageview such that all three elements occupy equal amount of space.For that i have set android:layout_weight="1" in all the three elements.Still i see space occupied by all three…