imageview

Rotate an Android ImageView AND its background

Using this mechanism I'm able to successfully rotate the image in an ImageView. Works great. However, if the ImageView has a background image, that drawable is not also rotated. How can I also rotate the background image of an ImageView? ...

Safe, standard way to load images in ListView on a different thread?

Before making this question, I have searched and read these ones: http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview http://stackoverflow.com/questions/1409623/android-issue-with-lazy-loading-images-into-a-listview My problem is I have a ListView, where: Each row contains an ImageView, whos...

how to set the bitmap the to the ImageView in main.xml captured from the camera?

I have a Imageview in main.xml, how to set the bitmap the to the imageView in main.xml i can assign bitmap to the local image view in the below code. //Activates the Camera Intent intent = new Intent("android.media.action.IMAGE_CAPTURE"); startActivityForResult(intent, 1); // get the bitmap data from the Camera Bundle...

Android: ImageView scales up source image

I can't seem to get my ImageView to display its source image in its original size. The ImageView looks like this: <ImageView android:id="@+id/Logo" android:src="@drawable/logo" android:layout_width="wrap_content" android:layout_height="wrap_content" > </ImageView> The source image is 140 pixels wide, yet on the Nexus One's ...

How do you setLayoutParams() for an ImageView?

I want to set the LayoutParams for an ImageView but cant seem to find out the proper way to do it. I can only find documentation in the API for the various ViewGroups, but not an ImageView. Yet the ImageView seems to have this functionality. This code doesn't work... myImageView.setLayoutParams(new ImageView.LayoutParams(30,30)); How...

Android Show image while video is buffering?

I have an app that displays a video using VideoView. The layout consists of a Clock and a VideoView laid out in a simple vertical LinearLayout. Here's my code snippet that I use: VideoView mVideoView = new VideoView(this); mVideoView.setVideoPath(myVideoURL); mVideoView.requestFocus(); mVideoView.start(); Since the buffering of the vi...

Android change orientation of ImageView

Is it possible to change the orientation of an ImageView to be always PORTRAIT, while the other views in the activity can rotate? Since images don't always look good when rotated... Thanks Chris ...

how to display external image in android?

I want to display external image like: "http://abc.com/image.jpg" in my android phone application. can any one guide me how to achieve this? ...

Redundant margins when adding ImageView to ScrollView in Android.

Hi.. I have been trying to use a ScrollView on a single ImageView with a JPG (~770 x 1024) over an AVD that's 600x800. My main.xml is: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android...

how to display remote image in layout ImageView?

dear friends, i am using following code to display remote image in my layout imageview ImageView img; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); img= (ImageView)findViewById(R.id.myImageView); GetLiveImage(); setContentView(R.layout.imageviwer); } public vo...

Unlock Android Image fails to Show

Whenever the Android device locks and I unlock it, the image that was displayed in the ImageView disappears. What do I need to do to redisplay it or prevent this from happening. More: I have a view that displays video, images or text depending on the context and three subclasses that extend the parent view. On creation, I replace the di...

How to rotate a drawable with anti-aliasing enabled

I need to rotate an ImageView by a few degrees. I'm doing this by subclassing ImageView and overloading onDraw() @Override protected void onDraw(Canvas canvas) { canvas.save(); canvas.scale(0.92f,0.92f); canvas.translate(14, 0); canvas.rotate(1,0,0); super.onDraw(canvas); canvas.restore(); } The problem is tha...

Set ImageView's max width as a percent of its parent's width

I'm loading navigation from a website, where each item has a title, description, and image. I want to have all of the titles and descriptions centered along the same axis. I'm using the following layout for each item in a ListView. It works fine when the images are half as wide as they are tall, but not if they are any wider - the text ...

Why is android:FLAG_BLUR_BEHIND creating a gradient background in my new activity instead of bluring the window?

Hi, I've got two activities. One is supposed to be a blur in front of the other. The background activity has several ImageViews which are set up as thin gradients extending across most of the screen and 10dip high. When I start the second activity it sets the background as a gradient occupying the entire window space, that is it ap...

Android: OutofMemoryError: bitmap size exceeds VM budget with no reason I can see.

Hi. I am having an OutOfMemory exception with a gallery over 600x800 pixels JPEG's. The environment I've been using Gallery with JPG images around 600x800 pixels. Since my content may be a bit more complex than just images, I have set each view to be a RelativeLayout that wraps ImageView with the JPG. In order to "speed up" the use...

How can i use RotateAnimation to rotate a circle?

I want my circle image (ImageView) to rotate as the user touch and drag it. If the user drags it to the right, it should spin right and vice versa. Like when you spin a DJ disc, if you know what i mean. I've played around a bit with OnTouchListener and RotateAnimation but i'm getting nowhere. Any ideas? ...

Imageview ontop of another imageview

I have a listlayout with items in it that looks like this: There is first an ImageView (the light) and then two textViews. All of this inside a TableLayout. (source here: http://code.google.com/p/switchctrl/source/browse/trunk/android/res/layout/device_switch.xml) I want to have a rotating animation of a loading indicator Ontop of th...

android multitouch image zooming?

I'm displaying an image on full screen now i want to zoom it in or out. Any one guide on how I can implement multi touch image zooming? I am using the 2.1 sdk version. ...

Android: Scrolling an Imageview

I have an ImageView that is twice the height of a normale screen ( 960 dip). I would like to scroll it nicely up and down on the screen. The bottom of the screen should contain a bottom. I have tried various combinations of ScrollView and Imageviews without any success. I have also thinkered with the :isScrollContainer attribute without ...

How to position a view in AbsoluteLayout dynamically (Android)

How could I set x,y coordination of an ImageView ? The layout of application is AbsoluteLayout, I tried to call layout() but seems not working (the ImageView stay at 0,0) and setPadding() seems not a feasible solution because I need to do collision detection later. Sorry, new to Android, thanks in advance. ...