I am trying to design a game that has multiple buttons in rows. I want the user to be able to press a button, hole it and move it to a button on the side, top, or bottom of it and the two buttons will change places. Were do I start the programing to make this possible. I am new to programing so any help would be appreciated thanks.
You can try implement an ontouchlistener for your buttons, and when event is move do the movement via setting margin on the button.
Take a look there also:
stackoverflow.com/questions/17464428/property-animation-of-a-moving-button-android
To identify when the button is above the other button or near it, to perform the swap (you may need to animate this as the above link, too) try to get all the buttons position via view.getTop and view.getLeft ( as described there) and store them. When you move a button you have the coordinates of your finger dragging the button, so by extension you have also the coordinates of the button being moved. So then you check inside the ontouch event move again, when, after the set margin, your button is close enough to any button and perform the swap between them
See here for getting positions of buttons.
( stackoverflow.com/questions/7203740/retrieve-the-x-y-coordinates-of-a-button-in-android )
Related
What is the Jog Button program?
It seems to have installed itself on one of my hardware buttons and ocassionally scrolls through several functions when that button is pressed.
I know how to change the button assignment but am wondering if there is something about Jog Button that we will want to use?
JogButton was just a freeware app we liked which allows multiple functions to be controlled by a single button. Feel free to re-assign the apps using JogButton's 'Tools' menu, or to use the button for something else entirely.
X
Thanks for the quick reply.
Do you know where I can find a help file for instructions for Jog Button?
I couldn't find it within the device and in playing with the program it just doesn't come to me.
JogButton Instructions
Fairly simple once you get the hang of it...
1. Press-and-hold the contacts button to activate JogButton. This causes the programs in its list to scroll/cycle
2. Release the contacts button when the icon of a program that you want to activate appears
Setup
1. Press-and-hold the contacts button
2. Click on the tools menu at bottom of screen
3. Select setup from the tools menu
4. The dialog that shows lists the programs and order of cycle.
5. Add/Delete/Edit as desired
6. The Snd check box is a toggle for sound/no-sound (a beep as each program is shown)
7. Duration is the number of milliseconds that an icon is shown
Hopefully that answers you questions
I'm the author...
Tek
Thanks for the reply. You are a genius!
This seems like a very handy app.
Joe_PDA
other buttons
What about using this very simple app on the calender button.
Have your "serious" stuff on one side,
then "toys" on the other..
I presume you have future plans, so give us a clue please
Perhaps even ask for ideas...
Martin
JogButton - Future Plans...
I started coding an alt-tab like feature into JogButton, but was not sure if that would be useful for anyone other than me. As you may know alt-tab in the Windows world scrolls you through the open list of of apps in a Last-in-first-out/Most Recently Used fashion. This would be useful for switching between two apps, the downside would be that you would have to remember the order. I was thinking of putting a toggle on either the menu or in the setup dialog to select this mode.
As for using two buttons, it is possible,but the way PocketPC handles the programs assigned to a button they have to have different names. I would of course have to make a few minor adjustments to allow for this, but it is possible.
I'm up for any suggestions to make this program more useful. Start a list and let's see what we get.
8)
Re: JogButton - Future Plans...
tekknogenius said:
I'm up for any suggestions to make this program more useful. Start a list and let's see what we get.
Click to expand...
Click to collapse
Bug: by timing a quick press just right, I can get it in a mode where it keeps cycling through the programs even though I've released the button already.
I think I was unable to map it to both the hardware buttons using a different list of programs to cycle through for each button. Since a single short press still does the same thing, there's really no reason not to map it to the second button also. (?? Quick hack: map second button to patched Jogbutton2.exe, using different set of registry keys. Better: multiple small stubs which start the real exe telling it which stub was executed. ??)
Maybe map a special action to pressing both buttons at the same time?
Also, something like 'double-press' and 'triple-press' found in some other programs to quickly go to the second and third item (or completely different items) without looking at the phone would be handy. I never really use the rocker-switch, but it could be handy for app starting: just keep the hardware button pressed and hit one of the four directions or the center, giving you 5 new things (per hardware button) to start.
JogButton...
Good suggestions. I can enhance it to use all available buttons. I prefer to use one hand, but others might like to have more options available.
hmm, must be a n00b suggestion, but perhaps it would be possible to use the volume control button? i dont use it for anything anyway.
Only two options... that I know of...
On the XDA/MDA PPCPE there are only two mappable buttons, unlike other PPC that have four or five. It's either the contacts button or the calendar button. Now once an app is mapped to either button and the app is launched, it can control any of the buttons. As a side note, the volume button would be great if it were dual functioning: a press-and-release brings up the volume dialog; a press-and-hold would bring up the record function.
Is any useful way to remap the Green and Red Phone button and the volume slider button? I mean for launch application or any function. Thanx.
There are some such programs for volume slider.
The most simple I prefer is attached here.
Just put it to the \Windows\Startup folder. It just "unbind" slider but not remaps it to another buttons. This will allow to use slider as F6/F7 buttons in programs able to hook them e.g. Haali Reader...
Thanx
It seems to be ok but where did you attach it? On my MDA is no offered file to download at this time. ThankU.
I've got it
Ok. Now is the sheet with uploaded file appeared. I've got it and extracted it. After i run the *.exe file it does nothing. Why?
because it should do nothing
This utility just frees slider buttons from default binding to volume control.
If you have an application that understands F6/F7 hardware key pressings (slider up/slider down) you may bind these key in the program.
As for me - I use them to scroll text up and down in Haali Reader text reader program.
But (as I said above) there are another programs to use slider up/down control. Unfortunately I don't remeber where I saw these utilities - but they really exists
And, as far as I'm back to the Andes from (Blue Angel) - I think I will write another one specially for Himalaya/Andes.
Ok, let's wait some days. If there are any results - I'll post the report here
P.S.: BlueAngel is the best HW keys equipped device i've ever saw But...
Thanx once again
Thank you 4 ur help. Now i understand that. And what about the Phone buttons? Any ideas? Ex.I want to use red button as Ok/Close simulation. Any ideas how to do that? Thanks.
Nobody unmaps phone buttons. It is possible but unresonable because of HTC is a phone device also. But I'll implement this feature too.
OK
I will wait for it.
The very first (and buggy) try of HW remapping utility is done. The application setup is available HERE
After installing .CAB file go to Start -> Settings -> Buttons and see the changes...
DO NOT INSTALL THIS APPLICATION ON BLUE ANGEL!!!
It will hide four lower hardware buttons until hard reset!
1. This app was tested on Andes with WM2003se, but should work on Himalaya/Magican with WM2003 and above
2. You will lose the possibility to use hardware key mapping in other applications forl remapped buttons. I need to re-grab buttons from time to time because the system tries to thieve them from me
3. Currently I don't now how to emulate green and reed buttons functionality after unbinding them from the system.
4. I can count any number of button pressings (3,4,5...), but -
5. WinCE reserve codes for only 15 hardware buttons (40C1..40CF)
There are some ideas for future improvement. But it would be nice to know your thoughts.
Just to "stimulate": I can create settings screen during setup to allow flexible configuration where you will
- choose which buttons to handle and how many key pressings to detect;
- choose option to unbind and/or re-map volume and phone buttons
- ???
And let me take a time-brake for 2 days before next programming session
The utility is ready. It allows you to:
remap each standard hardware button to 2 or 3 "virtual", simulated via double or triple clicks;
use volume slider to simulate Up/Down direction keys or create additional "virtual" hardware buttons;
remap Red and Green phone buttons to 1,2 or 3 hardware buttons each.
In a result you may create up to 15 hardware buttons (system limit)
Just install program and check Start -> Settings -> Buttons.
Here is Oficial AEBPlus home page, full desktop-based setup (~27K) and Direct link to CAB file (~30K)
Well done!
Excellent software! Thank you once again for your work. Works very very well!
man this is great really like it
works perfect :lol:
Seems to work great. Haven't had it running long enough to see if the camera button will get stolen back (big problem for me on XDA IIi), but being able to map the volume is great.
In the next version any chance of adding an <enter> option like Vito Button Mapper which I think just sends a <carriage return> to select whatever is highlighted.
Is "<Ok/Close>" option in button settings applet not the same?
NO, <OK/Close> generally tends to close the current window rather than selecting whatever is highlighted.
Also whatever application keeps on stealing back the camera button is still doing it. I don't know if it is part of the UK O2 customisations or the core PocketPC Rom, but eventually whatever function is mapped to the Camera button gets re-mapped back to the camera. This also happened to me with the standard button mapper and Vito button manager. It's a little annoying since the camera button is the most usefully positioned, and it is also easily knocked, starting the camera at awkward times.
Ok, I'll add this option for camera button (a bit later, in a case other suggestions arrives).
As for the re-hooking button by camera application: AEBPlus initializes all of the buttons from time to time. Currently this take place every 30 seconds. So if you will wait a bit - all buttons should be re-grabbed again
This does not seem to help because whatever application that is resetting the camera does it in the same place as you are storing the button mappings. When I go into the Buttons Setup it will now say that the Camera button is mapped to the Camera.
Yes,I see... It looks like Camera application is a pushy application . The solution is to remap "normal" Camera HW button to 3 press instead of one, but I don't like this.
Anyway - utility was released.
New features: added option to emulate Enter key with Camera button.
Hi AE, your utility is great. It is very useful but SIMPLE and SMALL.
I used it instead of other button mapper software.
There're some issues need tobe improved:
1) Mapping "Green" and "Red" button:
Enable mapping when they're iddle only (phone function does not work).
E.g: I'd like using Red button to close running app. But in phone function, Red button is still used to hang-up the phone as original its function. Anytime I have a phone call, I can use Red button to cancel a outgoing/incoming call.
You can refer the program of mamaich in this web site.
2) Single press is too low:
I press a key one time and wait 5 secs or more until it works. It's too slow. Can you improve? Double-press is OK.
3) Press n hold:
Can you add "single press n hold" for all hardware-keys? I think "single press n hold (after 3-3.5 secs)" is more convenient than "double press" or "tribble press". Do you think so?
Hi AE, very usefull application! Is there any way that we can have an options screen, where we can change the key options we get after installing the app? That would be easier to edit our preferences if we want to make changes to our initial choices. Furthermore I added a Mortbutton to one of your simulated hard keys. Each Mortbutton can show a list of 12 apps for a buttonpress. That means That I can now bind more than 60 apps to the buttons in total! Very good for one-handed use of my Magician, thanks!
I use smartskey and think its a great idea. Now im looking for a similar app, that will let me use the hardware buttons to open those drop down menus. For instance if you open the pictures application, there is a drop down menu to select a folder, or the storage card. I would like to be able to open this drop down menu with a hardware key instead of pressing on the screen. Does such a program exist?
Such an app is feasible, but for eg, looking at the pictures app, the drop down doesn't have focus when you start the app. So, first you have to give it focus, then click it, so either way you'll have to click the screen. So there isn't a generic solution to this and the next app that comes along because of the way the dropdown is implemented.
However, an easy enough way for this particular app is to use a mortscript.
V
You might try fakecursor http://www.geocities.co.jp/SiliconValley-Cupertino/2039/FakeCursorPPC.zip. not exactly what you're looking for but will accomplish the same thing in a way. if you hold the windows key and move the d-pad, a cursor appears onscreen and moves around and you can tap the center button to click just like a stylus tap.
I've been begging for smartskey to make the left soft key work like holding the windows key, but I don't think the author is going to do it, so you'd have to map a different key to activate it or slide the keyboard open a little to reach the actual key. dont map it to the e-mail button though. Holding that and the center button opens the align screen thing.
Guys,
does anybody know if and how can I make my dialer not dial the person when I single tap on the row but only highlight it and then use either the hardware dial button or the big green "talk" button ... or double tapping the highlighted row?
I find it very annoying when I tap an adjacent row by mistake and have to search again. This happens pretty often when I drive and have my HD2 on a stand but it also happens from time to time when hold the phone in one hand I try to select/dial the topmost row in the result list.
The last part brings another question - is there a way to add two arrow buttons at the bottom of the dialer which will go trough up/down through the list? These will be very helpful in such "car" situations and also in the case where the search criteria results in large list (more than 3-4 items) which requires a scroll (flip scroll) and/or hiding the dialing pad to see the full list. Currently I've mapped the Vol Up/Down keys for up/down directions with AEButtons but it's not very convenient / comfortable.
I'll try to make some kind of screen shot to show what exactly I mean but I believe you get the point.
Here are the screen shots - the original and the modified (using paint)
It would be great if somebody can make such a dialer ... or explain what I need to make it myself. (the arrow buttons should stay visible when one hides the dialer ... or when the user presses them to start moving the "focused" contact just as if hardware arrows are pressed).
pankov said:
Here are the screen shots - the original and the modified (using paint)
It would be great if somebody can make such a dialer ... or explain what I need to make it myself. (the arrow buttons should stay visible when one hides the dialer ... or when the user presses them to start moving the "focused" contact just as if hardware arrows are pressed).
Click to expand...
Click to collapse
I'm not sure but I don't think I can do it. I'm not to good at editing those resource dll files.
Someone like RyanMogul6800, or Fards, would know about this. Maybe senf one of them a PM.
I have a MAPL100 and downscrolling on the trackball has stopped working. It works sometimes, but usually it takes me 4 or 5 flicks to get it to scroll once.
That said, is there a way to remap one of the keys in the bottom right (Camera button, mail button, and inner circle key) to perform as a downscroll? Like a virtual directional pad.
Or remap a volume key?
More thoughts: the inner circle key can be customized via settings to launch a program. Is there a program that does nothing except send a scroll down signal?
Likely not. How hard is it to make one? I've hardly programmed for WM but I know .NET well so if you have any pointers towards such a program I would much appreciate them.
Thanks
Bumping this. I can't scroll down OR left!
Hi, why don't you try to flash a 3VOLUTION SERIES ROM, they have a button configuration functionally which gives you the option to configurate for long press and short press several buttons, otherwise you could try by installing SmartToolKit or AEB Plus button configurator, however in my experience these apps don't work well with stock roms as they can't seem to register the key remapping; unless of course the issue was with the sd certificates, now I couldn't tell as I'm already on the latest 3VOLUTION SERIES ROM.