Android Gauge Animation Help - android

I am new to android and i could really use some help here. I have two images both are PNG one represents a gauges and the second is the needle. I am trying to animate the needle according to speed (rpm), what i need help with is the animation portion. Any ideas?

You have two choices. You can use Canvas 2D and render it that way, or you can use the Android Animation framework with ImageViews.

Related

How to dynamically add slices to a disk image?

Hi I am new to Android and I am currently experimenting with some Android features.
So I wanted to find a way to add flexibly add slices to a disk image (could be a pie chart or a roulette wheel). I have done some research on this topic, Drawable Resources | Android. If I wanted to insert a slice dynamically, I think the InsetDrawable method would best suit my situation. So that a bitmap would not be recreated every time the image changes. I have also gone over some tutorial on how to change Cartesian coordinates into Polar coordinates Android SDK: Creating a Rotating Dialer. I was hoping to combine the InsetDrawable method with the polar coordinates to achieve this function. So I was wondering if can anyone tell me whether or not my thoughts are feasible?
A sample of the image that I would like to get is shown below:
Instead of having 6 slices, the user could add more elements to populate the disk to make it 8 or 10 slices, or remove slices from the disk.
It would be great if anyone can share a link to some of the related topics or tutorials as such.
Thanks in advance :)
What is that you exactly want? If you want to dynamically add a slice every time you click a button, all you have to do is arrange the 6 slices in the form of a circle in the xml as 6 ImageViews. You will have to make these ImageViews invisible initially. And inside the onClick function of the button you make the ImageViews visible one by one.

How to draw the different graph in android single layout

I am new to android just now i started to working on android,in my application i need to draw a 3 graph in one layout.I have attached the image exactly which out put i want..please help me to solve this problem
thanks in advance!
to draw graph what you can do is
1) put canvas on layout.
2) devide it on appropriate size.
3) draw on canvas directly.
may be this technique is tedious but its most efficient & easy to understand.

animation with sprite 2D android

I am building a virtual store with the effect same like this
enter link description here
The user can freely rotate the image from left to right and top to bottom or vice versa. I suppose to use sprite 2D to implement that animation. There are some tutorials I found but because Im pretty new about graphic programming so could anyone point me to the correct way that approach my expected performance. Thanks a lot.
The easiest way is to use the Canvas API in Android. Here is an example of how to use it with sprites.

How to create isometric grid android

i want to draw i grid like
Link
can some one please help me to create this grid programmatically in android
i am new to android game development and this is required for project
requirement is to create grid of tiles
Thanks in advance
You might need to draw this you self. If seems doable. But if you dont know how drawing is done, these tutorial should help.
Just use a combination of drawRect and drawLine to get this drawn.

How to create this layout?

I would like to design a layout for my android app which has imageviews/Textviews placed as shown in the figure below.
Right now, i tried to use Absolute layout, but i know that will create problems as the screen size changes.
Please help me with your ideas.
All comments are welcomed.
Thanks & Regards,
Sen
You should use 2D Graphics to draw shapes, 2D Graphics.
Hmm I think my approach will be to calculate some function that will model the curve (maybe two functions one for yellow and one for green 1/-x seems good) and then draw the circles with center coordinates like x = f(x). You can do this by simple implementing custom view and override onDraw method.

Categories

Resources