Android custom views: rotating wheel, "spinner" control - android

Are there any existing implementations of rotating wheel, spinner like (not the actual android spinner) controls for Android?
Example:

There are a couple of things that are similar that you should be able to modify to your needs.
As mentioned in the comments, you can use the Mind The Robot Analog Rotary Knob, which is a bit rough around the edges but you could use it as a base.
There's also a step-by-step walkthrough for creating a Rotating Dialer, which again isn't exactly what you're after but could be modified further.
The last one might be the most promising, which is a Rotary Knob Widget, the author states that the implementation could be useful as a volume control, which closely resembles your original picture.

Here is a totally awesome dial control for android https://bitbucket.org/warwick/hgdialrepo
It's well tested and very stable.
Here is the youtube demonstration: https://youtu.be/h_7VxrZ2W-g
The library comes is a demo app and source code.
Uses Canvas
Hope this helps.

Related

Are there simple AR SDK that does not use image recognition?

I'm looking for a 'basic' AR SDK that allows me to draw images and 3D shapes around the user (no matter where he is). It would be even better if the SDK includes a simple way to detect interaction with the shapes (something like onClick).
I made a project from scratch on Android but there's still a lot of work to do and I'll need to do the same on iOS after... So that's why I'm looking for an SDK or a similar project (no matter what platform).
I tested Metaio but it's quite expensive and maybe overkill for my purpose because it uses LLA coordinates.
I tested DroidAR on Android but it's only for Android and it looks heavy too (don't need the GPS).
How about Qualcomm's Vuforia? I was able to quickly get a sample project running on it.
EDIT Looks like I was wrong about what it could do. According to this (which is slightly dated, so who knows) Metaio might be your only choice.
i really don't sure what you really want to do ..but if you simply show images or 3d models on camera without any detection you can achieve this very easily i am explaining for Android and you can extend it to ios on same logic.
first approach:
you have to use custom camera of Android in your app,then use any game engine as per your need..i will suggest Jpct-ae or Rajawali
they are very simple to integrate and can be used for 2d images and 3d models.
this tutorial will explains a lot
keep the gl-surafce transparent and you can have model floating in space ...
second approach :
to add some more effect to your AR app you can use sensor values to move model in 3d space as per movement of device..it gives a cool effect.
use first approach and additionally collect sensor values and apply that matrix to gl camera of your game engine..for sensor values follow here
good tutorial here..
i hope this may help you..i done these a long time ago but try to help if you want..

How to have the revolving icon effect?

You see the icons are in a revolving manner. How to achieve this on Android? Is it through OpenGL or can there be some other easier implementation.. This has been bugging me from months together and I just need a pointer or a breakthrough code. A tutorial would be of awesome help...Please help?
There is a project 3D Carousel, you can get it and Since the screenshot seems to be a customized Home Screen, so you have to provide your own customized Home Screen,
Google released a carousel example with source code as part of the "Designing Android UIs for Phones and Tablets" session at Google I/O 2011. You get the source here. It uses Renderscript to create the 3D effect.

Android Development: How do graphics work in Android?

I am an android development beginner with some experience in other object oriented languages like java, python, c#. So I have created various games before in Java, using buffers and graphics to draw lines and stuff. How do I do that stuff in android? I looked at some online guides, and they all seem to create a class to extend a View object, and the class will overrule the onDraw method, where they can cause the Canvas or something to draw a line.
But what if you want to draw a line based on user input? That method wouldn't work then would it?
For example, what is the simplest code for which I could draw a circle where the user touches the screen?
Also, i was wondering what books people would reccomend for beginners, especially one that includes stuff on graphics? I user the developer site for android, but I feel a book would also help a lot to understand android? Any suggestoins?
Thank you for your time, I greatly appreciate it!
There you go, this book is definitely what you need to read: http://www.amazon.com/Pro-Android-Media-Developing-Smartphones/dp/1430232676
what is the simplest code for which I could draw a circle where the user touches the screen?
Either use SurfaceView to draw or create a custom View handling onDraw() and onTouch()
Here is a suggestion ... load the API Demos app into Eclipse and explore the Graphics demo source code. There are a large number of graphics demos.
To load the API Demos app, in Eclipse click File > New > Other > Android Sample Project.
Then select your build target such as Android 4.2.
Then from the list of sample apps select the API Demos app.
And finally click Finish.
There are over 300 demos in the app, so it can be difficult to navigate. You want to look in the Graphics section.
"Android 2D Graphics with Canvas API" by Yevgen Karpenko is pretty good for beginners.
It explains basic concepts like coordinate systems and transformations, shows how to work with text and use different graphics primitives (lines, paths, circles, etc.). It also shows how to use multiple threads in graphics apps.
Below is the link for eBook version on Amazon.
http://www.amazon.com/Android-Graphics-Canvas-API-ebook/dp/B00DKIAVK8/ref=sr_1_8?s=books&ie=UTF8&qid=1374420538&sr=1-8&keywords=android+2d

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.

Categories

Resources