Hi everyone.
I want to do implement such UI element as you can see at this video:
So I'm stuck with this scrolling dashed arc. It looks like RecycleView, but I wonder how to calculate such geometry. I've tried to do something with Canvas and onDraw method overriding, but how to update "rotation" of this scroll?(I mean "rotation", because if I change rotation of view, the arc is just rotates itself, not parts of it.
I think I could be implemented with GL 3d scene, but I don't know how...
Maybe anyone know how to do something like this or where I can find information?
Thanks in advance!
Related
I'm trying to create an interactive accordian/concertina/folding animation so that a view folds/unfolds on itself when interacted with - in the same way flipboard folds the view, but both sides fold
The way I thought I could do it was to override the onDraw method, somehow duplicate the canvas or the information on the canvas, then draw the first half of the canvas rotated one way, then draw the other half of the canvas rotated the other way so that they meet in the middle, however I can't seem to grab the information from the canvas! Is it possible to grab a bitmap/snapshot from a canvas?
The only other way I think it's possible to achieve this kind of animation is with OpenGL.
Any help are greatly appreciated.
EDIT heres a good example of what i want to achieve http://www.nytimes.com/interactive/2008/03/28/arts/20080330_FOLD_IN_FEATURE.html
check this archive to acheive fold animation
code: http://developer.android.com/shareables/devbytes/FoldingLayout.zip
modifies it to make it work for lower version up till API level11
I've got some problem. I have an image drawn using canvas, and I would like to animate it. I would like to do something like TranslateAnimation, but TranslateAnimation works only with views, and my image is not a view. What can I do?
Personally I haven't worked with Android canvas, but I am fairly certain that what you need to do is this:
Draw your shape on the canvas
Wait for a couple of miliseconds
Clear the canvas
Redraw shape to next immediate position
and repeat this until the final position is reached.
From my little knowledge the canvas is more similar to a piece of paper than to a flash animation. You need to draw, clear, recalculate, redraw. I highly recommend reading some more on the topic. Firstly, I would start with the android canvas reference: http://developer.android.com/reference/android/graphics/Canvas.html
and then try some tutorials like canvas frame by frame tutorial for android : http://developingthedream.blogspot.ro/2011/01/android-canvas-frame-by-frame-animation.html
And also I highly recommend looking up things on google first before posting a question on stack. There is a good chance, especially if you are a beginner, to find existing tutorials with everything you need and more. Good luck learning.
Not sure how to do this, or what the right terms are for describing this, but here goes:
I want to make a closing circle animation in my android app, much like the end of this video. I'm guessing what I need to do is somehow draw a black circle but instead of filling the inside of the circle fill the outside. How exactly would I do that, given the tools I have with Android's Canvas class?
Have you tried using clipPath to achieve this?
I was working on the same kind of thing and achieved it by using clipPath of canvas.
I want to make android-screen as white-board so that by touch on screen I able to draw something on screen.
I know I have to use canvas, Path all these things. But how I can make that screen so that i able to draw a dot there?
For that what should i do with my activity?
How can I do that plz give me some sample code.
Thank you
So maybe you should take a look to this example:
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/TouchPaint.html
ok to clarify. i understand that the map data is basically some images grouped in bounding boxes and drawn on a 2d canvas. is it possible to rotate the whole view so that it looks like on the image i posted from google earth, to get a kind of fly-over look? i know that there is a class in adroid used for 3d rotations on images(the camera class Graphics.camera)
There was a nice tutorial not long ago from sony-erricson with their 3d listview describing its functionality, but i don't think i can achieve what i need with it. is there a way that a view can be rendered maybe on a GL surface?
i realize that this isn't that simple to do but any suggestions or ideas on the matter can be helpful.
so where do i start?
tnx.
Very straightforward with OpenGL. Use triangles laid out in a huge grid and texture map accordingly, setup a camera and you are done. You even get elevations etc right with heightmapped terrain.