I am trying to display an image and pinch-zoom into the image. There doesn't seem to be any built in thing for this. I saw that there are some libraries, but would much rather not use a library for this.
Anyone have an idea on how to do this?
You should refer this answer which uses this library. And also refer the library by Chrisbanes. This is the best place for beginner tutorial
Related
My question is somewhat based off of this question. Displaying SVG files in Android
I have decided to display an SVG in my app, and I do so using the svg-android library. My problem is now how to add pinch to zoom functionality. Maybe this library is outdated and someone knows of another to accomplish this task. From what I see in the javadocs of svg-android, there doesn't seem to be any easy way to add pinch to zoom.
That's not something that needs to necessarily be part of the SVG library. You just need to implement onTouchEvent() in your view and use a ScaleGestureListener etc to keep track of your scales and pans.
http://developer.android.com/training/gestures/scale.html
i am upto recognizing the eye in an image (which is opened).The image is taken by the camera Activity in a tablet.By webservice i could connect it to postgres.But i dont know how i should consider those images to identify the eyes.when i searched i came across OpenCV but im new to it..is there any particular algorithm (name) to identify the eye..when i searched they said its possible in android with the help of opencv by simply importing some packages..but i dont know how to start and from where..can any one plz help me..Something supporting android will be helpful..
If my understanding is correct, there are few differences between the CV4Android library and the OpenCV C++ library. In addition, C++ code can be used by using the Native Development Kit for Android.
With that being said, OpenCV has a C++ tutorial that uses Cascade Classifiers to identify an individual's face and eyes and places a circle around each one of the eyes and a larger circle around the head.
The tutorial can be found here.
Edit: If you're looking for more information on the CV4Android and OpenCV C++ libraries, I'd recommend reading the reply to this question. Hope that helps.
I want to do a task which is very similar to "Android Drawing Pattern to Unlock", where in there will be circular images in a GridView and straight lines connecting the images will be drawn dynamically based on user touch. Please suggest me preferably with code snippets.TIA.
Actully, you didn't write your code into the question .so I think you are developing Android Application with COCOS2D first time.
Here is some awesome example links that may Help you to learn this.
1)COCOS2D Basic Game
2)COCOS2D MUltiplatform
If you want help regarding code please post your code here.
I am trying to make an application in which I want to use wobble effect. It's same like the AndWobble2 apps. But I am not able to find how it should be exactly done. I found one library named Army Knife Library which is used for J2ME based mobiles. My question is can we use the same library for the adding the wobble effect to images or can we do this in opengl? Does anyone have any links or explanations to see how this is done? Thanks in advance.
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.
There is the possibility to use a webview to display a local file. The Webview has integrated multitouch zooming. Have a look at my question regarding this topic.
I have a working implementation for 2.1+
WebView solution caused problems for me on 4.0.x (lot's of weird white spaces appearing)
https://github.com/jasonpolites/gesture-imageview
Might be useful for someone...
A recent post on the Android Developers Blog includes an example that does exactly what you ask. Unfortunately, it relies upon ScaleGestureDetecter which makes its first appearance in Froyo.
Have you tried using the intent "android.intent.action.VIEW" and letting the phone's built in image viewer display your image? It will probably use multi-touch controls if the phone supports it.
http://developer.android.com/reference/android/content/Intent.html#ACTION_VIEW
Regarding gesture-imageview lib:
https://github.com/jasonpolites/gesture-imageview
it's in fact useful, but unfortunatelly it has some bugs, like:
https://github.com/jasonpolites/gesture-imageview/issues/37
Anyway, good lib to try. It solved my usecase.