My vision is this-- I have an image of a human body(like an anatomy chart), and I want the user to be able to click a certain part of it and be able to communicate the body part they have clicked on, as in translating it to text... I wonder if this could be possible, and how? Any sample code/redirection to a tutorial would be helpful, or maybe just a practical idea...
A very simple approach is just to add an ImageView to you layout.
Override onTouchEvent in the activity to capture touches and then translate the coordinates to texts.
Related
I'm trying to create an overlay that is triggered when a button is pressed. This overlay is supposed to allow the user to add their contact and I was wondering how can I use fragments to get this effect like you can see in this mockup.
I am in a dilemna over using fragments is the right choice. My reasoning being that I only need to have it do one task that is adding contacts, and thus I do not need a whole activity.
This is what I have on the main activity right now
I would really appreciate any help on understanding how to make this work.
You can use a DialogFragment.
It behaves like a normal Fragment for the most part. Here is a guide for a basic implementation https://guides.codepath.com/android/using-dialogfragment
They appear automatically in the center of the screen. To get it a bit lower like in your mockup you can change where it is in the window. Here is an answer showing such Position of DialogFragment in Android
Guys i am developing Camera Application and this is my first android Application.
below i am Adding My App Screenshot for what i want.
First View :
Here , after Clicking on a Top-Right Corner Filter icon i want a below View.
Second View :
i don't know how can i get this type of a view. also how can i design this type of view into XML parts.
and i read more articles like how to Open a Multiple Surface-view Preview onto single screen but i did not get any much appreciate solution.
and Finally after selecting any of the Filter Preview i want a above Image type View.
means Selected Filter's is Preview apply onto Camera [Surfaceview Preview].
Please provide any type of Material link example.etc
guys please help me.any type of help will be appreciated..):
Thanks in advance
From the images, it's from a app called Geak Camera. Actually, I developed this app, and I used the GLSurfaceView not the surfaceview. And the app is not maintained now because I left that company. And I updated that app called "U camera".The scale animation was improved in "U camera".
All these manipulations can be performed with OpenCV. Download their basic Android example, and you can add your logic to onCameraFrame() callback.
How I can create some thing like this? Has it any specific name or view? Like red cycle image in below link:
You can create that view using a ListView like its explained there: https://developer.android.com/training/material/lists-cards.html.
You can create the floating button using an oval shape with an image inside and set some elevation. Click here for more info How to create a floating action button (FAB) in android, using AppCompat v21?
Have a look at general Android Material Design Guidelines to get some additional insight for these kind of ui. https://developer.android.com/design/material/index.html
This can be useful for you. I made a "dummy" Gmail UI for show a material activity transition. https://github.com/coyarzun89/FabTransitionActivity
I'm trying to figure out how to make this happen.
In Touchnote, when you start a postcard you select a picture from camera/gallery/facebook and then it displays it in a ImageView(I think?) and you can pinch zoom it and rotate, etc.
Pinch2Zoom
Also, after the picture is edited by the user, I want to use that image in another imageview.
How's that achievable?
If you truly wish to do this using MOSTLY Native Android APIs, then you can implement the ImageView and android's native pinch to zoom capability. From there you can follow the link I have provided on StackOverflow to grab the drawingCache (essentially a screenshot) of the ImageView to place into another imageview
android screenshot?
Well, I found this library on github that does the pinch to zoom thingy and stuff:
https://github.com/jasonpolites/gesture-imageview
I'm posting this here so if there's anyone with the same question, they can use this. Yes, it's a bit limited, but it works out :)
I have developed many applications for desktop or web in java, but never for android.
What little I have practiced with was weird because I am used to SWING. Since it uses .xml files for applications I was wondering if you needed this also in games?
For example there is a a good example at http://developer.android.com/resources/samples/JetBoy/index.html. I was hoping someone could explain two things for me.
How is the image drawn to the screen?
How do you listen for user input? (Eg. Clicks, drawing, swiping, ect...)
I have made games on the desktop so you don't have to get in depth, but I found it hard to understand the code. (What I was suppose to do special for android.)
(Another way to put it:)
I guess basically what I am asking is how to I draw an image that will in turn listen to clicks and such without adding a button? Or do I need to add an invisible button? Then if I did have to add a button how would I listen for swiping and drawing?
Also I saw some methods like doDraw(), but did not see where they were putting the image so it would appear on the android device.
JetBoy is rather complicated for a beginner, check these simple examples which are based on the same principles as JetBoy: How can I use the animation framework inside the canvas?
Everything is done by drawing bitmaps on the view's canvas and an event which detects when and where the sreen was touched.
I think this will tell you everything you need to know, in a comprehensive, 31 part series detailing the creation of Light Racer 3d for Android.
If you are not going to use any Game Engine ,
basically you extend android.view.SurfaceHolder
and then overide these methods,
public boolean onTouchEvent(MotionEvent event)
protected void onDraw(Canvas canvas)
go through
these articles.It teaches everything you need from the scratch