imageview

Why would ImageView.setImageURI() work in Android 2.2 but not 2.1?

I am displaying images and some text in a list view with an adapter. The images are pulled from the web, then cached locally and displayed. The images are already small (60px square), and I know their size, so I'm using the advice from here suggesting I use setImageURI instead of decoding the bitmap. The class that does the work is ...

Change ImageView after few seconds

Hi all, I'm trying to implement a simple activity that will let user to insert a password. I've a gridview with the 9 images to use and 4 imageviews that will be the selected images (on clicking on item on gridview, the corresponding image will be filled with the selected one). Now the problem: I want that the 4 imageviews acts similar ...

cell.imageView is working on Simulator but not on Device.

Table view cell imageView is working on the simulator but not on the device.. Some things I have checked. I have not changed anything in the code. Image is added to the project and in same folder. I have one more cell image which is working fine. Thank you in advance. ...

Android: How do you scale multiple views together?

I'm trying to layer graphics one top of each other, like an icon over a background, with the second layer (icon) at a certain pixel offset from the top left corner of first layer (background). Since each layer will eventually have its own animation, I'm placing each in its own View. For my implementation I have two ImageViews, one for ...

How can I make a imageview visible, 5 sec pause, invisible, 5 sec pause and so on...

I have an imageView and want it to work like this: ImageViewer visible 5 second pause image view invisible 5 second pause ImageViewer visible and so on ... How do I do that? I have tried sleep but it freezes the whole program in 5 seconds. I just want to affect my imageView. ...

ClickEvent on animated ImageView fires only at the start position

Android: I have an animated ImageView with an onClickEvent registered. I want the ImageView to move around the screen and then click on the ImageView. But when I click on the moving imageView, nothing happens. When I click at the position of the screen, where the imageView was at the beginning, the clickEvent is fired. So the real posit...

How can I change the CommonsWare cwac thumbnailAdapter to cache to the SD Card?

I am using Mark Murphy's ThumbnailAdapter in a project to cache and display images from the web in a list view. It works well, except that it caches to internal memory. I can't figure out how to modify it to cache to external memory. Any advice? cwac-thumbnail: http://github.com/commonsguy/cwac-thumbnail ...

Android: Knowing ahead of time what size an ImageView will be?

My application uses thumbnails downloaded from the internet. The thumbnails are generated by the server, and one specifies in the request what size the thumbnails should be. Is there a way for me to know, programmatically, while inside a ListAdapter's getView(), the dimensions of an ImageView inside the View that is returned, so my thumb...

Preventing scale on bitmap created in execution time for ImageView - Android

Hello, I have a ImageView acting as a top banner on top of a webview. The image of this banner is created in execution time dependending on the resolution of the device. The height of the banner is always the same for each resolution. The only thing that changes is the width, which changes according to the orientation. But, since the wi...

How do I make my ImageView a fixed size regardless of the size of the bitmap

So I'm loading images from a web service, but the size of the images are sometimes smaller or bigger than other images and the visualization looks silly when I put them in a ListView in android. I'd like to fix the size of my ImageView so that it only shows a portion of the image if it's larger than a preset amount. I've tried everythi...

Resize AlertDialog to fit image exactly

Hey guys, I have the following AlertDialog with an image inside it: As you can see there is a small gap just above and just below the image. I'd like to remove that gap. My layout xml looks like: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id=...

Does android:scaleType="fitCenter" only work with fix Layout_width and Layout_height attributes?

I use Layout_width="fill_parent" and Layout_height="wrap content". If an image is bigger than the ImageView, it will be downscaled perfectly. However, I never got it working to upscale smaller images. I tried any combination of ScaleType and "AdjustViewBounds": it always stays in its own size in the middle of the image view. Here is t...

Android: Saving Image to Database

I have a activity with 3 imagesViews and a Button. Clicking on the ImageView shows an AlertDialog with a list of images (located in /res/drawable) that the user can select. I've hit a wall where I don't know how to store the images to the database that were selected in the ImageViews. Any pointers? ...

Scaling Images in a Linear Layout Evenly

I have a linear layout that contains 6 images, which span the linear layout horizontally. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@layout/rounde...

checking if android list item (Drawable) is still visible.

Let's assume i got a list of ImageView and TextView with LinearLayout. Now i'm using simple ArrayAdapter extension that gets Strig[][] as items which is an array of double strings (each entry contains String[2] where the first string is a uri to the image and the second one is the text. i override getView to display the image and text , ...

Android - Imageview in center in all screen resolution

Right now, i am developing Android Application using SDK 1.5 and testing application on HTC Hero, its firmware is Android 1.5. Let me come to actual point: in application, i am having an imageview for displaying image (Image resolution is 320*480), now imageview is displaying image in full-screen perfectly, but when i am trying to test ...

Using ImageView to make a 2D Map of Icons

So I'm struggling a bit here trying to create a 2D map of icons, where each icon is 48x48 pixels and the map is a 9x9 grid (thus, 432x432 pixels in size). I tried, unsuccessfully, starting with a GridView and have since decided to try using an AbsoluteView inside of a LinearView. Here's the beginning of the XML file (I've not added all...

How to view a big picture by dragging on Android? Just like we do on Google Maps..

I've being trying this all night through. Is there any good solution to do this? Having a sample code is better! ...

How to set a PNG file to an ImageView?

I have a file called nochart.png in /drawable. How can I set this to an ImageView? chartImageView.setImageDrawable(R.drawable.nochart); Does not compile. ...

ImageView animation help

Hello, I'm trying to figure out how to animate in and out of Imageviews. Basically I have a LinearLayout with an ImageView and a Button at the bottom. Everytime the button is pressed, onClick() is invoked and I do image.setImageResource(imageArray[imageCounter]); I simply change the image displayed on the ImageView by selecting diff...