I would like to program an image that the user can press which will display another image when touched to give the user more information but then revert to the previous image after the user stops touching the image. I would also like to add vibration and a ding sound (which I have) when the image is touched. I looked into this but found someone else with the same problem who couldn't help - they said only one of the actions was possible. Help?!
Oh, and if you're feeling extra kind.. Is there a way to configure the amount of time the extra info picture stays when the user stops touching the image?
Thanks
Have you tried any coding at all before asking how to do it? Also, rather than asking how to do a whole project you should ask the parts you are having trouble on once you've actually attempted it...
Related
I know how to setup a listview to have an image and some text on each rows.
I know how to have the user open up a dialogue to pick an image from the file system or live.
I almost know how to downsample it in case its huge. (too many ways, no expert to recommend one).
I really need to know how the user can create db entries (notes) that contain text and an image that is user selected. In essence, the user is entering text and selecting/uploading an image that makes a 'note' and the notes get displayed in a listview.
I don't want the full code, but rather a general direction. I did some research and for me its a big forest. If you can give general directions how thats done, I'll do the rest.
Thank you,
I want to realise and implement a function. But I do not know what the skill name is what.
I reference the Gallery APP in android I found that Gallery have a function is when user browse the picture, the picture will display and dismiss automatically when it reach screen edge.
Just like the picture I draw, picture will show when it reach the screen edge.
It's called Horizontal ScrollView.I also reecomend this library to you: https://github.com/lucasr/twoway-view Have a look here too: https://www.airpair.com/android/horizontal-image-galleries-android-studio
There is a library on github may be also helpful: AndroidImageSlider
I want to do image processing on frames from Android Camera in real time with OpenCv, but all the OpenCv Android examples provide a preview of the image being captured. I really don't need previews of the frames , is there any way to get the frames without actually showing the preview ?
A quick/naive way would be to make onCameraFrame method returning null and set your CameraBridgeViewBase visibility to SurfaceView.INVISIBLE or SurfaceView.GONE.
I still would like to know if it worked for you, but meanwhile I found the solution that worked for me. As I feel grateful for the guy who wrote it, I'm sharing this (scroll down to answers section) with anyone who will have same problem in future.
In case the link vanished, here's his/her pro-tip:
You can set your preview (in this case a CameraBridgeViewBase)
transparent by setting the alpha value of the view, with 0 being
completely invisible.
mOpenCvCameraView.setAlpha(0);
This should make your preview "disappear".
I wonder how your solution works, because as you can read in the docs:
This method is invoked when delivery of the frame needs to be done.
The returned values - is a modified frame which needs to be displayed
on the screen.
Indeed, in my case it doesn't work but I desperately need such a functionality.
I am developing application where user capture's photo and moves to next activity with captured image. Now in next activity i have already given another image via XML which i am able to move and set anywhere over captured image now what i want is when i press OK button then this activity should move to next activity with captured image and also other image which i have set.
i have done with this but the problem is, i want to Fix the position of other image, example if i have set that image on captured images Nose then it should show on nose for Next activity. I don't have any idea about this. Can anyone tell me how to fix the absolute position of Image or any sample code that might help me.
Here you can see the photo, When i press OK button next activity looks something like this. http://share.pho.to/3wDYP
Basically you need to merge these two images into one. Create a bitmap and add both images into one.
Here is an example answer1 and answer2.
Also This is a very useful Tutorial 1 and Tutorial 2 for you.
Thanks in advance for your time!
This has been bothering me for quite some time now. What I want is to display a small .png image on the screen where I tapped my finger, with the camera being active. I don't want any picture to be taken or anything, I only want it to display what the camera sees and on top of that, a small .png file.
I'm trying to make a geographic game where you are able to "shoot" your opponent in the end by seeing through the camera, and tapping him on the screen, to shoot him.
I'm kind of new at this, so the code I made is useless, for anybody, me included :S
Any help or advice is much appreciated:)
To make this effect, first of all you can't use the default Camera App, like this:
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
because you can't modify anything on this activity.
And actuary you can write an activity use hardware.camera to take picture.
http://developer.android.com/reference/android/hardware/Camera.html
This will need some knowledge about SurfaceView to show the camera preview and the small .png images, but I'm sure you will find a lot of examples around the Internet.