How to create imageview with zoom and pan functionality? - android

I created an app that has a small image loaded from URL of a website. I want that when user clicks on that small image it'll show the image in full screen and will also have the ability to zoom and pan that image.
What I've done was showing the image in WebView with built-in zoom controls but the result was ugly. (I've set the layout to wrap_content so no white areas are shown, but it cause the image doesn't zoom dynamically).
Any solution? and sorry for my bad English.

Problem solved! For anyone who have the same problem, I've use this library and it works great! http://blog.sephiroth.it/2011/04/04/imageview-zoom-and-scroll/
Here's a link to the Github ImageViewZoom page.

You can build that from scratch or... you can use this library:
http://code.google.com/p/android-pinch
Take a look at the PinchImageView class

You need to use GestureDetectors. Google has excellent sample interactiveChart for this, see https://android.googlesource.com/platform/development/+/master/samples/training/InteractiveChart
and http://developer.android.com/training/gestures/scroll.html

Related

how to blur the image in selected area in android?

Hi.
I am trying to implement a feature in the app that blurs some part of an image based on users (selection/touch) the selected area. I have implemented the code for whole image. But I am unable to find any example for the specified area of an image. So, please help me which type of example will use.
Just search before posting here :
Use this to blur your photo :
https://futurestud.io/blog/how-to-blur-images-efficiently-with-androids-renderscript
And use this to select the area you want
http://code.tutsplus.com/tutorials/capture-and-crop-an-image-with-the-device-camera--mobile-11458
Use this to blur image sample example:
http://javatechig.com/android/how-to-create-bitmap-blur-effect-in-android-using-renderscript
I found it by the below link:
http://trickyandroid.com/advanced-blurring-techniques/
Now i am going to develop this link to drag and drop the selected blur area. But i am not getting to drop this blur in other area. please help for this.

Clickable resizable buttons on image android

I am trying to create an application which has a map image in it.
I want to add some areas (or buttons) to it so that when you click them the bubbles with information will appear.
I am new in android programming so asking to explain a bit how to implement it?
Also i need an image to be re-sizable just like a real map.
So should i attach the buttons to specific places on image and how to do so that the buttons will be connected to it when i re-size an image?
Which image type is better to use for this purpose? I heard that SVG would be better but i couldn't even add svg image to an application.
I appreciate any helpful advice.
For your problem you can use this:
http://catchthecows.com/?p=113
I need something similar, but the click on the image should change the content of that part as well.
When I find or implement the final solution I can post it here.

How to make glow effect in image view for a small part

I want to make a small part of the image glow whenever the activity is loaded. Do I need to take the exact coordinates of the image part?
I recommend using a GIF. It can be loaded as an image and won't require any changes in your code. A smallish tutorial can be found in this Youtube video.

Horizontal scrolling images gallery in android

I am working on camera application in android and have a page with a camera preview on half of the screen and an image gallery as shown in image below. Right now, i am using gridview to show image thumbnails in gallery. But, the problem is, i can't make the gallery scrollable(horizontally). I also found that horizontal scrolling is not supported in grid view.
The screenshot i provided is from iphone app and that is working fine. I used uicollectionview in iphone app for the same.
I can't find anything like uicollectionview in android.
Any help will be appreciated. Thanks in advance.
Or you can use additional plugins like this
You could take a look at Gallery if that is what you meant. Just take not that it recently got deprecated and you should either use a HorizontalScrollView or a ViewPager and programmatically add the items.

android: how to load and display large images(A0 size) - like google map did?

I have to load and display some very large images, some have size A0(33.1 × 46.8 inches) .I did follow the way Google map display map by split the image in to may tile( size 128x128 pixel) in difference zoom levels ( for zooming in/out) and load them on the view , but i still get stuck on the performance issues , it doesn't smooth enough . I think some as you have faced the same issue and got the idea to solved, so if you can please shared with me and everybody . As i know there is a CATiledLayer Class for doing this work on iOS system . Any help will be appreciated.
Check this. According to its README it's a "A tiling scrollview to display large picture (similar to iOS "CATiledLayer")"
there is one third party library called MapView,
this is best to load very large images.
try this link

Categories

Resources