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
Related
this is my first question here, so maybe I'll make some mistakes.
I want to create an Android app for touch test, and draw a cross on the screen, however I'm succeeded to draw cross, but now I want to implement test screen login.
What I want to do is that, When user clicks on any circle it should be removed/hidden or change color to transparent.
Any kind of help would be appreciated.
this is the link to my code.
https://github.com/akhlaqshah36/stackoverflow_questions/blob/master/drawCicles
and attached screenshot.
I got the solution by using some formulas of distance and Using Pointer objects.
check the solution here if someone need it.
Solution Link drawing cross in canvas
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 would like to develop a function so that i can edit and draw some lines on the existing image. Can anyone give me some idea how to implement it? thanks!
You should ask in detail; explaining what have you done till now, how are you approaching it.
Anyways, Refer this series of blog- Drawing with Canvas, it will get you going.
First you have to load the image like this. Then you can draw on it like this.
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 have been trying to make such a demo where i need to draw many(hundreds of) circle shapes on canvas(or any other way if possible) ,
after drawing the canvas i need to zoom and move it..
and also want to capture the click(touch) event of each shape separately ..
so i know i can get canvas touch event and get x and y positions and check which which circle is touched but i have to draw many circles and as well after zooming and moving the circle's x and y pos is changes so plz help me..
Give me any suggestion how to do this..the way to go..
or if any ANDROID MASTER have done some thing like this..plz plz give me code sample..
thank you all,
good day..
according your requirement you have 2 use one of the android game framework you can find so many game engine check this thread or you can use andengine one of the best 2D game engine in that you can find many example code.
for your requirement just follow the PinchZoomExample from here
any further help comment the question i love to help this prob.