Android Gestures to Replace Physical Arrow Keys - android

I'm starting from scratch and I don't even know where to look.. or even what to call this.. so any help would be appreciated.
I am working with the Snake example that Google supplies and I want it to work on Android devices without physical keys. How would I be able to use touch gestures (up/left/right/down) to make the snake turn and whatnot.
Again, I don't even know where to start looking.. I'm still slowly learning my way through programming for Android.
Thanks!

You could implement View.OnTouchListener. I think this page is the one you're looking for.
I would modify it so that touching the top part of the screen sent the snake up, the left side sent it left, etc.

Related

Split-Screen in Android App Development

I was wondering if there was a way I can have part of my screen in android constantly display something, even something as simple as a piece of text or an image. I am fairly familiar with Android Development, so if there is a way to make an app that does that, it'd be great.
To be precise, I want the top third of my screen to stay constant, and the bottom two-thirds to work normally such that I can do anything I can normally do
Edit: I want the top third to display the constant text/image even if I exit the app. A widget is a good idea. I'll look more into that.

How to add multiple pages in AIR for Android

I want to add multiple pages in my Android App, similar to the home screen on my phone, I want to be able to swipe left and right to see multiple pages.
I'm developing my app in Adobe Flash CC 2014 using "AIR 16.0 for Android".
Anyone know how I can do this?
You can go with different approaches for this problem. You could create some SwipeGestures to detect that or you could go the way Flash went since 1999, setup a Movieclip (or many) and listen for onMouseDown (ontouchstart) events and then say mc.startDrag(); (you want to limit the drag-movement to the X axis). Then onMouseUp (ontouchend) you can determine if the current MC is relativly cented and then tween it into the middle of the screen, or if the page is to far left/right and therefore page to the next page. There is also a Touch Drag implementation out of the box with ontouchmove .
Basicly what you are looking for is some kind of coverflow for AS3 ... or something a lot less fancy. Please make yourself comfortable with startDrag and StopDrag and you will see how you get there my doing.

How to use a virtual keyboard for flash game on android?

I want to send keys to a flash game on android, as you know, when you touch screen, can control game but if you put some buttons over game, it doesnt work i mean, you cant control game. I think sendkeys doesnt work or I couldnt do that..
Is there any way to control game with external buttons on android?
You can simulate touch event in android. See this link. It has been well discussed in StackFlow community. And good luck with it!

How to record touch movements on Android keyboard?

I apologize if this is a stupid question. I have only taken an introductory Java class and am a beginner to Android.
I want to track the drawing made by a finger using Swype and record each stroke as an image or vector of some sort.
Is there a simple way to record a touch movement in another application, maybe by making an application running in the background?
Thank you and I appreciate any guidance!
Touch events are consumed by the top-most view. Because swype doesn't have any kind of API you can hook into you won't be able to get that information. Input Events | Android Developers
There might be some way to create a skeleton keyboard application that captures the gestures that people make over an image of the swype keyboard that then passes that gesture to the real swype, but I'd personally be worried about copyright unless it was just for personal use.

How to create an overlay canvas with propagation of touch events to the home screen?

For the life of me, I cannot figure out anything about this topic. Maybe I'm just not using the correct keywords while searching.
What I'm trying to do is create an overlay transparent canvas which will basically pass on all touch events to the Android home screen, in effect, making the phone completely usable.
If I'm not making sense, please have a look at the "Transparent Screen" application on the Android Market. That is exactly what I want to do. The camera preview screen is always on top while the phone can be used normally. How can I achieve this?
Got it! Just use this in the activity:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
It creates a click-through activity.

Categories

Resources