How to draw letters by dragging finger onScreen - android

I am new to Android..Please anybody help me..I am working on application for kids..I want to make the user to draw above the text like A,B,C ..At the same time I want to make the user can only draw above the letters not outside of those letters..And while drawing I want to give the different colors..I have searched a lot but i didn't get exactly what I want..

If you are new to Android I suggest you learn the basics first (web tutorials or books). If you are new to Java you should also have a look at this. Once you are starting to get the hang of both, you can move on to creating an application like this (which sounds tricky).
Just to get you started, I'd advice you to have a look at the SurfaceView class, which will allow you to render to the screen.
PS: Just a reminder, this site is for program specific questions, not vague questions. :)

Related

Android equalizer

I'm not even sure that equalizer is the right name for it. Basically i need to show sound wavering, like in screenshot below:
I was looking throw stack, and googling, overall i found this library:
https://github.com/steelkiwi/AndroidRecording
What i've achieved using it is :
As you can see it's just previous result just fading and new one is drawing above it on canvas. This is achieved using android class Visualizer(https://developer.android.com/reference/android/media/audiofx/Visualizer.html)
But what i need is to gather and show both previous and new data by moving canvas like this:
And also i need to store all this data somewhere to then show it all in Play mode, or just something that will show full data of audio while playing(not only part like now)
Summary: In theory i can move canvas and drawig data manually, which i don't want to do, because i'll lose some time on optimizing drawing and making the whole thing. Also, it won't resolve my issue with playing, because data only for current moment will be sent to visualizer. So i need something like library or advice from someone, who worked with the same or similar functionality
If something is unclear, please ask your question in comments

[Android]min3d -collision detection and some stuff

I,m using min3d framework on my device to make some car game, so i created some simple car model and simple and its moving, but i want to create ''physics'' and i need the collision detection which isn't provided in min3d (i won't change framework because i have android 2.1 without possibility to upgrade) i want to create it by my self but the problem is that i don,t know how to check if the plane collides with anything what i want to do is:
-create simple flat rectangle (not cube) and i want to place it in front of ''car'' and check if something gets inside of this rectangle and something does i want the car to bounce of it in reversed direction (the problem isn't to bounce but: how to check if something gets through my rectangle)
I have some other problem too:/
When i enclose my ''game''(haha) with a LinearLayout in xml everythong is going fine till i use the command to set the text with the value of rotation of a car for example -then is force close:/ I'm doing it form my class from which i load my objects (i'm providing my classes too)
I was searching for tutorials on the web but none of them was tlaking about 3d collision and even if it was about 3d there was too much code that wasnt need and i was loast in it so i dont get anything
I ask you royal users from stackoverflow to provide me example for creating the rectangle(if needed, because i can laod model from .3ds and .obj)and check if something gets through it(intersects?) not for entire code but just for the method how to do that, and how to refrsh the value of a car, in layout without a crash
By the way: my ''game'' is using qwerty keyboard as input (i,o,p,l keys)
Wanted to post my class here but its to much of lines and was getting erros so grab it on free hosting site, its scanned by avast already on my pc, it contains my entire project with min3d too.
My sources ready to compile and run are(with min3d -which isn't mine):
http://odsiebie.pl/ax1v1p5tam8i/KRL044.7z.html
thanks in advice:)
an approach is to break it down to two dimensions (xy). imagine that your cars are 2D-Rectangles. in the moment you want to check collision, just check if any of the four corners of your "car" is within the rectangle of another car. might be not best practise but works for me.
instead of this you could use r-tree sqlite to check collision.

How to persist the gestures of the GestureOverLayView?

Suppose I am writing a word "abc" in my GestureOverlayView and while doing so I need to save all those alphabets in the screen until I press a clear button.Can anyone tell me a good way to do this..
I will write "a" which is taken as a gesture (not as stroke) i.e One thing I though of was like use a ImageView or SurfaceView on bottom of a GestureOverLayView.and Suppose when I draw "a" on GestureOverLayView then in the "onGesturePerformed" event it will take the Gesture and then get the strokes and then convert them into paths and then draw the paths onto the underlying ImageView or SurfaceView.Can anyone suggest me the code or guide me.I tried various combinations of them but couldn't solve it..
There's an app called GestureBuilder in the samples directory of the SDK. This app shows how to persist gestures drawn by the user.
I realize this is an old question, but you can "cheat" by increasing the fadeOffset to some ridiculously high number. This can be done either in the xml
android:fadeOffset = "some very large number"
whatever, or programatically,
yourgestureoverlayView.SetFadeOffset(some very large number in milliseconds)

Help with making objects touchable on Android using canvas

I'm trying to create a simple Pegs game. I have drawn the 15-hole board using canvas. I have been programming a while, but games are new to me and I'm stuck on what to do when it comes to handling the pegs. I want to only use the touch screen, but it seems like it is really difficult to touch the pegs and actually select them individually. I plan on just drawing everything programmatically. What is best way on handling this? Using buttons as place holders and changing the button image? Any help would be greatly appreciated.
To be very brief, you have to keep track of the things you draw on the canvas.
I wrote some tutorials for making and moving selectable shapes on the canvas. They should help a lot.
On android it might be a little different than using mousedown, but it should give you a very good starting place.
I don't know if this will help, but you might want to write your own onTouch()function. Check it out

Custom layout in Android: scrollable graphic with selectable elements over top

I'm fairly new to the Android platform and was wondering if I could get some advice for my current head scratcher:
I'm making an app which in one view will need an image, which can be scrolled on one axis, with a load of selectable points over the top of it. Each point needs to be positionable on the x and y (unlikely to change once the app is running, but I'll need to fine tune the positions whilst I'm developing it).
I'd like to be able to let the user select each point and have a graphic drawn on the point the user has selected or just draw a graphic on one/more points without user intervention.
I though for the selectable points I could extend the checkbox with a custom image for the selected state - does that sounds right, or is there a better way of doing this? Is there any thing I can read up on doing this, I can't seem to find anything on the net about replacing the default images?
I was going to use the absolute layout, but see that it's been depreciated and I can't find anything to replace it.
Can anyone give me some code or advice on where to read up on what I need to do?
Thank you in advance
This really feels like something you should be doing with the Canvas and 2D graphics, rather than trying to twist the widget framework to fit.

Categories

Resources