imageview

How to reset the zoomed image into original image

六月ゝ 毕业季﹏ 提交于 2019-12-12 11:33:43
问题 I am using the TouchImageView class available at https://github.com/MikeOrtiz/TouchImageView. when i move from the zoomed image to next and get back to previous image it still have zooming. I want to reset the zooming image into normal position when swipe to previous image and got answer by refer this question How to reset an image to the original position but I don't know exactly where have to put the this method in this library so can you please help me to guide? Thanks in advance. public

uiscrollview zoom in and zoom out doesn't work properly

[亡魂溺海] 提交于 2019-12-12 11:16:44
问题 I have a uiscrollview and there is a uiimageview inside it. I want the used to be able to zoom in out of the image since it's a big image. the scrollview only needs to scroll vertically not horizontally. before adding the zooming effect I had the following code and it worked as I wanted, -(void)viewDidLoad { [scrollView setScrollEnabled:YES]; [scrollView setContentSize:CGSizeMake(320, 1690)]; } So I did some research and ended up with the following code to enable pinch zoom in and out, -(void

Using ClipDrawable to hide a part of and ImageView

ⅰ亾dé卋堺 提交于 2019-12-12 10:20:18
问题 I am trying to hide a part of an image so that the user does not see it. Initially I copied the Bitmap pixels on another Bitmap, without copying only the pixels that I needed and making the second bitmap the correct size at creation. That worked, but I have many large images and that results in OOMs unfortunately. So instead of doing that I thought on using a ClipDrawable to draw the image, and making the pixels that I don't need invisible. The code is as follows ClipDrawable clipDrawable =

How to show thumbnail from image path? [closed]

只谈情不闲聊 提交于 2019-12-12 09:26:53
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . How can I show a thumbnail from a fixed image path in an ImageView? 回答1: you can create Image thumbnail from the image path as: public Bitmap getbitpam(String path){ Bitmap imgthumBitmap=null; try { final int

Android relative layout placement problems

柔情痞子 提交于 2019-12-12 09:08:48
问题 I have been having problems creating a relative layout in XML for a list item to be used for a series of items in a ListView. I have tried for hours and am tearing my hair out trying to get it to look how I want but cannot get everything to appear in the correct spot and not overlap or mis-align. I can get the first image and next two textviews in place but cannot get the last textview and imageview. I have attached a wireframe style image of how I am trying for it to look and was wondering

How to display image from database in CodeIgniter?

不问归期 提交于 2019-12-12 08:45:28
问题 I am using CodeIgniter 2.1.0 and MySQL database. I have uploaded an image through a form and successfully stored it in a uploads directory and I have also successfully stored the full path of the image in my database. but i am having problem with showing the image by calling the full path from my database. Here is my code for the upload: $image_path = realpath(APPPATH . '../uploads'); $config = array( 'allowed_types' => 'jpeg|png|gif|jpg', 'upload_path' => $image_path, 'max_size' => 2097152,

Android Picasso Image does not load

萝らか妹 提交于 2019-12-12 08:29:37
问题 There are two situations I load images, first, just directly from the internet, and second, load images that are downloaded in the device. And whenever I load, 8~9 out of 10 images are shown, and 1-2 missing. I see that decode returned false, and google'd as hard as I can, but couldn't come up. WAIT_FOR_CONCURRENT_GC blocked 22ms WAIT_FOR_CONCURRENT_GC blocked 20ms GC_FOR_ALLOC freed 718K, 31% free 9948K/14256K, paused 49ms, total 51ms D/skia: --- decoder->decode returned falseGC_CONCURRENT

“Mosaic” (splitted) images - Gmail's letters style

让人想犯罪 __ 提交于 2019-12-12 08:19:05
问题 On the new versions of gmail, there is a cool imageView that shows multiple contacts images in it (link here for example) . for example, if someone has sent me an email, i only see his image: ####### # # # A # # # ####### if i've replied to him, i can see my image next to it, but both my image and his are halved and share the same space of the imageView (and i think both have scaleType to be center crop) : ####### # # # # A# B# # # # ####### if another person has joined the conversation, it

How to get same co-ordinates for image for all resolutions in android?

我的未来我决定 提交于 2019-12-12 08:03:49
问题 I stucked with getting x & y co-ordinates of an image for all resolutions. 320, for devices with screen configurations such as: 240x320 ldpi (QVGA handset) 320x480 mdpi (handset) 480x800 hdpi (high density handset) 480, for screens such as 480x800 mdpi (tablet/handset). 600, for screens such as 600x1024 mdpi (7" tablet). 720, for screens such as 720x1280 mdpi (10" tablet). I have created my image view with original size of an image like 1500 x 1119. When i touched the image i can get the co

How to get the image name of the ImageView in Android?

a 夏天 提交于 2019-12-12 08:01:21
问题 I have an imageview in android . I want to get the name of the image which is set in the in the imageview. How can I do that ? ImageView v = (ImageView)findViewbyId(R.id.img); //String name = findImageName(v); if( name.equals(a)) { //do something } else{ //do something } 回答1: For this first of all you need to set a tag for your ImageView <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageview1" android:background="@drawable/bg1" android