How to create a gesture controlled rotating image for a UI - android

I'm trying to figure out the best way to make an image rotate along
with a user's finger dragging it left or right. I want to try and
match the rate a user's finger is moving with the rate the image is
rotating.
I've got the basic setup for my application going, with the menus and
whatnot I want to have, and that's all running great on the emulator,
I'm just not sure how to approach this part.
I can code all the logic I need for my app, I'm just not doing to well
designing the UI, I have a picture in mind, I've actually made a
couple mock images of it, I just can't figure out how to get it going
in Android, and any help would be appreciated.

I'd suggest you to look at first at:
http://developer.android.com/guide/topics/ui/ui-events.html
I am not really sure how to solve the problem with the real-life rotation but it seems OpenGL might help you.
http://developer.android.com/guide/topics/graphics/opengl.html
or maybe a solution through custom animations is possible?
http://developer.android.com/guide/topics/graphics/animation.html ( => http://developer.android.com/guide/topics/graphics/prop-animation.html )
Tell us, how you solved it!

Related

Android visual animation on screen touch

I am coding a game in android and i want to play a kind of animation when user touch the screen. I know that there is probably tutorials to do this. But i don't really know what is the name of this effect so i don't know what to search.So all my searches were vain.The effect is like the one you could see in this image(image ) in Magic Tiles 3.
Thank you.
I would suggest you to switch to unity :) Native Android is not really made for that kind of stuff.. More constructive answer:
Quick googling showed couple of particle libraries, for example check this
Running particle like animations natively is not really a recommended way to go since since you will be running around 10-15 animations in a loop (which will have a really hard impact on your apps performance). If you still want to go this way, it would be the best to create animated drawable or use lottie animated image views and set as your layout background

How I can do that animation in Android

I want to make an app, a kind of "Never have I ever" but with cards. When a "tricky" card appears I want to display an animation like that:
A image with text apears from the right side of the screen and stops on the centre. Waits a few seconds (3-4). In that waiting time it could size up a bit or something like that. Finally it goes out by the left side of the screen.
I have found out a similar animation in a game called Clash Royale.
http://i.imgur.com/8kB18dj.gifv
Thanks on advance.
*As note: I will develop it on Android Studio.
I need help doing it, examples por something like that. If you put the conde I will be thanked.
If I get you right, you want help with the basics of animation in android...
I know, that this is probably not exactliy what you wanted to hear or read, but you have to get into the huge topic 'animation' by yourself - I think you won't find someone, who does that specific animation for you.
A good way to start may be the following tutorial on how to make some real basic animation stuff:
YouTube Tutorial Part 62 (and the following)
I walked through this tutorial series by myself and it really helped me a lot.
Also this seems to be a good tutorial about animations.
Good luck and have fun!

Must be OpenGL?

I'm new to android and I need to do a project like this : I have 22 images that represent a person which is rotating. When the user touch the right side of an other image the image is changing (the person is rotating to right). The same thing is for left side.
My question is: I must use OpenGL? I made some example with openGL but I don't see if for my project it is necessary. I was thinking that maybe it is enough to change the background image at every touch.
What do you guide me to do?
Thanks in advance
I know this isn't exactly the same thing but this tutorial by the excellent guys at Sony Ericsson show how to make a nice looking 3D list without OpenGL - http://developer.sonyericsson.com/wp/2010/05/20/android-tutorial-making-your-own-3d-list-part-1/
Maybe you could use some of the techniques in this tutorial to achieve what you want?
The OpenGL may be useful to do your project
you can see the Example Code project here code.google.com
And The Blog url that has explained nicely to work with OpenGL has many part of the Tutorial
May be looking at this you can get idea how to go ahead.

Slide images the screen. Do I really need to write my own "game engine" or use someone elses?

I'm thinking about writing a pretty basic game, which mostly involves sliding images around on the screen when tapped. So tap an image and it slides to one side. Doesn't seem like Android Animations will help me here since those don't actually move the images, just makes it appear moved.
So even though this seems like pretty basic functionality, it seems like I have to write a game loop,etc and implement my own code to handle the "animation" (including some acceleration/deceleration), etc. Not hugely hard or anything, but just seems like overkill. Also using a 3rd party game engine also seems like overkill, just in the time it would take to learn that, and so on.
Am I off base here?
If anyone has any suggestions that might get me pointed in the right direction (links, etc) that would be great. Is there a good way to use Android Animation functionality in this case that I am missing?
If you are developing for Honeycomb, it may be as easy with animations. With Honeycomb, there is a whole new strategy to animation. Check out the blog. The premises is that any property or value can be animated, and that includes the view's actual position (and not just look like it moved).
I have built a couple of games using AndEngine (http://andengine.org) I would recommend it for making games for android. And since it is all written in java, it is relativiely easy to integrate it with layouts and other activities.

add animation to android-wheel

I'm trying to update the project at http://code.google.com/p/android-wheel/ to act like the iPhone spinner/Urban Spoon App.
I want to add acceleration/deceleration to scrolling, as well as a spinning animation. I just don't know where to start. I was able to get the whole control to slide with the built in android transitions by adding the effects to the onTouchEvent in the WheelView here.
Obviously that's not very useful and I don't think the transition animations are what I need. Can anybody take a look at this and at the very least suggest how to start modifying it to do what I want? Any help would be appreciated. I don't expect anybody to implement this and hand it to me but I'm confused and frustrated with this, so I would like some kind of guidance.
I've tried the webview method here but it loads and runs kind of slow and it doesn't animate either so I'd rather just use the customized Android controls if possible.
Thanks for any help.
Now the android-wheel project supports animation. So, you can take a look at code to investigate how it works.

Categories

Resources