imageview

Display image based on Gridview selection from previous activity

核能气质少年 提交于 2019-12-02 18:19:56
问题 I currently have a working gridview displaying some thumbnails. Currently, when you select an image it will save a larger resolution of the image as a wallpaper. What I want to do is open a new intent and then display the full resolution image based on the GridView position clicked. I'm not sure how I find out what position was clicked from the new activity/intent. Heres what I have in my main activity public class test extends Activity { /** Called when the activity is first created. */

Change ImageView after few seconds

浪尽此生 提交于 2019-12-02 18:13:30
问题 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 to password fields: for 1 seconds appears the selected item and then another image... I tried using asyncthread but I got and error: Only the original thread that

Image View not Wrapping Contents

亡梦爱人 提交于 2019-12-02 17:49:50
I've got an ImageView wrapping this image : <ImageView android:layout_height="wrap_content" android:layout_width="wrap_content" android:scaleType="fitStart" android:src="@drawable/oncmap"/> and right below it, a TextView. Unfortunately, it either pushes it down the view or out of the view depending on the device's screen size. http://i.imgur.com/CuVFK5P.png http://i.imgur.com/6wzMebV.jpg I can "hack" it, but it'd rather not... <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout

Android ImageView Fixing Image Size

跟風遠走 提交于 2019-12-02 17:16:25
I have an Android Application, where I have an ImageView , I need to keep the size constant, there can be various images that I need to put into this ImageView , of different sizes. I just need to ensure that all the Images must fit into the ImageView , the Image should increase in size if it is smaller and should decrease, in case it is bigger. Thanks a lot for your time. Youngsik Oh Fix ImageView's size with dp or fill_parent and set android:scaleType to fitXY . In your case you need to Fix the ImageView's size. You need to use dp unit so that it will look the same in all devices. Set

How do I implement this image view in an async task?

邮差的信 提交于 2019-12-02 17:14:41
问题 I have an url passed to an activity and I am trying to show the image from the url full screen, however it throws a main network thread exception. From what I can find I believe I have to put the method in an async task however I cannot seem to make sense of it at all. So how would I put this method in an async task? FullScreenImageView.java public class FullscreenImageView extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

android imageview onClick animation

99封情书 提交于 2019-12-02 15:36:55
I guess this is kind of an odd question but I have tried setting onClicklistener on an ImageView and it has worked. But the problem is that the user cannot sense the click. I mean if some of u have worked on other mobile environs(like Apple iPhone) then when we click on an Image in other environs then it gives an effect on the image so that the user can understand that the image has been clicked. I have tried setting alpha using setalpha method but it doesn't work. Though the same thing is working fine on onFocusListener implementation. Can some1 suggest a different way to modify the image on

Android自定义ImageView实现图片圆形 ,椭圆和矩形圆角显示

烂漫一生 提交于 2019-12-02 15:35:22
Android中的ImageView只能显示矩形的图片,为了用户体验更多,Android实现圆角矩形,圆形或者椭圆等图形,一般通过自定义ImageView来实现,首先获取到图片的Bitmap,然后通过 Paint 和 onDraw ()进行圆形图片显示。 效果图: 代码: 自定义ImageView类 /** * 实现圆形、圆角,椭圆等自定义图片View。 * @author zq * */ public class ZQImageViewRoundOval extends ImageView { private Paint mPaint; private int mWidth; private int mHeight; private int mRadius;//圆半径 private RectF mRect;//矩形凹行大小 private int mRoundRadius;// 圆角大小 private BitmapShader mBitmapShader;//图形渲染 private Matrix mMatrix; private int mType;// 记录是圆形还是圆角矩形 public static final int TYPE_CIRCLE = 0;// 圆形 public static final int TYPE_ROUND = 1;// 圆角矩形 public

Android Google Map to show as picture

流过昼夜 提交于 2019-12-02 15:18:23
I've implemented Google Maps V2 in my android app and now I would like to do something differently. I'm showing a location (longitude, latitude) with a marker. The problem is that this is showing in my activity as a Map. I would like to show it as a ImageView and only if someone clicks on it show the map interface. Basically what I want to do is a static preview of the location and display it as a picture (with a frame and rounded corners) When clicked then open maps and give all functionality. Is there a way to put a map fragment into a ImageView? Any help you can provide will greatly

Slide Unlocker ImageView ViewFlipper

廉价感情. 提交于 2019-12-02 13:12:41
I want to develop an unlocker. You can unlock by sliding to the right (just like on the iPhone). Wich is the best method to implement this? Should I use a ViewFlipper and a GestureDetector? I have already tried this, but I could slide anywhere on the screen to unlock. The ImageView of the ViewFlipper should slide with my finger and only if my finger is directly on the imageView. Dave Try looking at this question for gestures on images, or any view for that matter. 来源: https://stackoverflow.com/questions/9182515/slide-unlocker-imageview-viewflipper

Get Image from Url Unable to Decode Stream: fileNotFoundException

前提是你 提交于 2019-12-02 12:59:14
问题 I know this issue as been ask many times but i've tried many solutions and no one works. On Android, I'm trying to get an image from URL to put it in an image view. Unfortunately, I get the following error : E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: http:/lorempixel.com/1920/1920/business (No such file or directory) When I try to reach this URL from the browser of the emulator, it works. I've already tried the following solutions : Load image from url How to get