onClick - G1 Apps and Games

Me and a friend are making an app right now and came up to the part to where we want to make it change color or change the lighting on a button when you click on it and the only thing that we can find that there is to work with is the onClick command, and i'm being told that we would have to call upon that and then have it show the new pic and that start whatever command the button originally has to begin with a millisecond later. I thought that there was a way to make it show the new pic when holding the button down and then when released it would then do what the button is suppose to do. Any suggestions on how to accomplish this?

Oh and when making the buttons i'm making premade png buttons.

So is it not possible to do the shading when you click on the button if you're using image buttons?

Related

change button layout

just wanted to see what everyone thinks about the button layout.
should we keep it?
should we change it?
how can we change the button layout ourselfs?
is there any progress on making an application to allow us to change our button layout?
what does everyone think?
im used to the button layout now but i would love to customize it to my liking.
There needs to be a third option. "Allow for customization"
Everyone perceives their needs differently.
EDIT: Should also mention that I'm fine with it the way it is, but the way your post is worded makes the third option necessary.
Leave it,
Its perfect.
leave it. Only add button combination for running apps.. If everyone's is different, you will have a hard time giving directions based on buttons.
i like it the way it is as well. the only thing nicer would be more buttons; if we were able to get the red button to "go home, then sleep" it would allow long press camera to be used to display running applications.
a program to modify the keymap was in the works. don't know what happened to it.
i think it would be awsome if the keymap were like this. power is power, volume is volume, 1 tap camera goes to landscape, long press camera goes to camera, left d-pad is back, right d-pad is forward, up d-pad is menu, down or center d-pad to go home, red end button as is, green button as is.
cp0020 said:
i think it would be awsome if the keymap were like this. power is power, volume is volume, 1 tap camera goes to landscape, long press camera goes to camera, left d-pad is back, right d-pad is forward, up d-pad is menu, down or center d-pad to go home, red end button as is, green button as is.
Click to expand...
Click to collapse
can't change dpad function - need it for many games. for those who don't play games, would be great. once again, individualizable keymap seems best.
I personally like it.
We used to have an older configuration but this current one seems very usable making efficient use of the keys we have.
I like it as it is.
myn said:
I personally like it.
We used to have an older configuration but this current one seems very usable making efficient use of the keys we have.
Click to expand...
Click to collapse
If you mean the original, menu on the volume slider, that was THE worst. Last year I quit Android as soon as I started because I hated using the volume slider all the time.
slow88lx said:
If you mean the original, menu on the volume slider, that was THE worst. Last year I quit Android as soon as I started because I hated using the volume slider all the time.
Click to expand...
Click to collapse
personally i was in love with the old layout
i loved how holding the home button showed all running apps and made switching between them a breeze
if we could somehow incorporate the old layout
id be all for it!
even though i'm accustomed to the current one
cp0020 said:
i think it would be awsome if the keymap were like this. power is power, volume is volume, 1 tap camera goes to landscape, long press camera goes to camera, left d-pad is back, right d-pad is forward, up d-pad is menu, down or center d-pad to go home, red end button as is, green button as is.
Click to expand...
Click to collapse
it would be cool to have that button layout and make the center d-pad to swith back to the current button layout so we can use the d-pad for games and whatnot.
cp0020 said:
it would be cool to have that button layout and make the center d-pad to swith back to the current button layout so we can use the d-pad for games and whatnot.
Click to expand...
Click to collapse
That just seems overly complicated.
When I first switched to Android, I hated the layout, but it's grown on my now. Only thing I wish is for a spare button that could be made into a search button so I could have working quick compose in chomp sms.
preardon said:
That just seems overly complicated.
When I first switched to Android, I hated the layout, but it's grown on my now. Only thing I wish is for a spare button that could be made into a search button so I could have working quick compose in chomp sms.
Click to expand...
Click to collapse
if we can put android on our phones i think we can do that
cp0020 said:
if we can put android on our phones i think we can do that
Click to expand...
Click to collapse
I was saying more from a user standpoint than a development standpoint.

Button Mappings on Android for the HTC Vogue

Hello XDA'ers,
I am wondering what the reason behind why the buttons (camera, power, green, red, etc.) in Android on HTC Vogue map to the various tasks they do? For example, the camera button is back, but why not the red button? Is this something hard set in Android and cannot be changed or did someone specifically set it up this way for a reason?
Secondly I am wondering if I create a new "keylayout file" (source.android.com/porting/keymaps_keyboard_input.html) or modify the default one in /system/usr/keylayout/qwerty.kl will I be able to change the mapping of these buttons?
Compared to the Win Mobile mapping, they button layout can take some getting used to,
but once you get used to it, it's actually a very cool layout, especially if you are right handed.
You can hold the phone in your left hand, and use your thumb to access the settings 'top button',
Use your ring-finger to always back-out or end an app
Green button for phone / initiating calls
Red button to end a call, sleep mode, or power off
I wish the d-pad had more use, but I'm always using the stylus, so barely use it.
Would love for the d-pad center key to maybe be the main power-off button.
Does_It_Matter said:
... It's actually a very cool layout.
...
I wish the d-pad had more use, but I'm always using the stylus, so barely use it.
Would love for the d-pad center key to maybe be the main power-off button.
Click to expand...
Click to collapse
I completely agree the current layout is a very cool layout indeed, but as I imagine most people on here like to tinker it may be interesting to know how to customize the button bindings.
I am not sure if its just a matter of changing the button layout file.
I looked at that qwerty.kl file in the android.tgz
It looks like its just a mapping file, and if you change the mapping, you change
buttons,
but doesn't that mean you're just re-mapping the button itself?
Not re-mapping its functionality?
I.e., if you remapped the camera button to the d-pad center, for example, then
the d-pad center would do all functions the camera button used to do,
and the camera button would do any functions the d-pad center would?
Seems like you'd actually have to change more code than just the .kl file?
i wrote this application for polaris, and with simple changes you can add the vogue setup...

Help with "back" and "menu" buttons?

I'm an amateur at all this I've managed to get my nook color rooted, and I've installed a few apps. I've tried softkeys, but I'm not 100% happy with the result. First it wouldn't start on its own after a reboot. I reconfigured it following some directions form another user, and it starts now, but it's still too "busy", with bars and buttons popping up all over.
ALL I WANT is an app or some way to configure a "back" button and "menu" button in the lower black bar where the clock, bettery meter, etc are? Any ideas?
Either that, or is there a way to turn off ALL THE OTHER FUNCTIONS AND DISPLAYS of softkeys EXCEPT the ability to go "back" when pressing the physical "N"/home button, which is how I have it now.
In the end, I don't want any "back" or "menu" buttons on the actual viewable screen except the lower black bar.
THANKS a million!!!!!!!!!!!!!!
not quite what you asked for but i remapped my volume keys for menu and back. works great for my needs. i control volume with a widget now.
hxxp://nookdevs.com/NookColor_Remap_volume_buttons_for_back_and_menu
hope this solves your frustrations with hotkeys.
nookcolor
zeam launcher
Well, if all you want is a back button on the notification bar..... you have one. Not talking about the back button that appears on there either. Just swipe left on the notification bar and it should always work as a back button.
Other than that, there's an app you can try called Button Savior you can get from the Market. It has a small launcher button that appears on the edge of the screen. You can move it around a limited range as you see fit. It's not as complicated or as "busy" as Softkeys.
If you find the visible button not to your liking, you can try this modded version of Button Savior. The button is invisible. You can see where the button actually lies by switching to the Sense UI theme. Then back to the default or Froyo theme to make it invisible once more. The modded version of Button Savior can be found here:
http://forum.xda-developers.com/showthread.php?t=897253
I suggest you try the Market version of Button Savior first.
I'm going to second Button Savior. It hasn't let me down once
Sent from my LogicPD Zoom2 using XDA App
g-costanza said:
I'm an amateur at all this I've managed to get my nook color rooted, and I've installed a few apps. I've tried softkeys, but I'm not 100% happy with the result. First it wouldn't start on its own after a reboot. I reconfigured it following some directions form another user, and it starts now, but it's still too "busy", with bars and buttons popping up all over.
Click to expand...
Click to collapse
You don't have Softkeys set up properly..
http://nookdevs.com/NookColor_Default_Launcher
I understand what you are looking for. I would like the same thing, but I do not believe there is anything out there for us..
I may end up remapping the volume keys myself.
spikey911 said:
I understand what you are looking for. I would like the same thing, but I do not believe there is anything out there for us..
I may end up remapping the volume keys myself.
Click to expand...
Click to collapse
With SoftKeys you can put the menu and back buttons in the notification area, since ver. 1.0.8 I believe. Then, disable the popper, and you are good to go.

anyone created an APK for a simple back button

I don't need a lot of added functions, but I would love the ability to go "back a level in menus"
Maybe its I am new but can find no reference to the ability.
Can anyone help?
rgreenpc said:
I don't need a lot of added functions, but I would love the ability to go "back a level in menus"
Maybe its I am new but can find no reference to the ability.
Can anyone help?
Click to expand...
Click to collapse
Not sure if you are running stock or some other mod, if you are rooted you can get the Button Savior app or Softkeys app. both present the standard android keys on the screen for you to use.
I will take a look at softkeys.
rgreenpc said:
I will take a look at softkeys.
Click to expand...
Click to collapse
I ended up using Button Savior, because its got the option of having the button displayed permanently (unless you "x" it out).
You can swipe to the left on the taskbar to go back.

Back button simulation, for righthanded

Our phone has back button on the bottom right side of the phone, thus making the phone use with right hand only very unpleasant, mostly in news reading apps where back button is used often when going back to the front page.
Is there any software button simulation app where I could position the back button somewhere in the bottom middle?
jazzh said:
Our phone has back button on…………
Click to expand...
Click to collapse
by adding some line (i forgot what it was ) to build.prop, u can enable on screen keys.
something like-
<something >. hardwarekeys=0
then, in settings (settings/system i think)
u can rearrange them...
Sent from my GT-I9070 using xda app-developers app
It sounds good, I'll take a look into it. But I don't want to disable hardwarekeys, I want all hw keys and just 1 sw key (back)...
To enable and use Onscreen buttons...
@jazzh,
Yep, you can you can use on-screen buttons BUT it will take/reserve some part of your screen's display.. that's why I don't use it BUT you can give it a try..
Just download the app build.prop editor and add this line at the end of your build.prop:
Code:
qemu.hw.mainkeys=0
(make sure to keep an empty line at the end of your build.prop, otherwise you will get a bootloop)
To disable it, simply remove the line above or set the value to "1"
3 MORE THINGS:
- This is what it will look like...
- You can resize the on-screen buttons BUT that will require you to modify your framework-res.apk
- I just found out about this app.. this will allow you to enable or disable on-screen buttons easily but its made for Xperia devices, so I am not sure whether it will work or not...
jazzh said:
It sounds good, I'll take a look into it. But I don't want to disable hardwarekeys, I want all hw keys and just 1 sw key (back)...
Click to expand...
Click to collapse
i don't think it disables the hw keys. it just enables the onscreen keys.
Even better: u can use pie controls if u add that line to build.prop
Sent from my GT-I9070 using xda app-developers app
Thank you all guys!
I added the line at the bottom and rebooted and... voila, soft keys are up and running.
Now, I didin't see anywhere not in the settings>system where these buttons can be adjusted. It would be nice if there is autohide option or something. Remember, I need only back soft key to be in the bottom middle or bottom left?
Then I installed pie control app, this works too but it doesn't have the option of autohiding softkeys at the bottom.
Is there something else I could try, I just need back software button elsewhere then bottom right corner and not all the time. Can it be achieved?
Thx again for helping...
jazzh said:
Thank you all guys!
I added the line at the bottom and rebooted and... voila, soft keys are up and running.
Now, I didin't see anywhere not in the settings>system where these buttons can be adjusted. It would be nice if there is autohide option or something. Remember, I need only back soft key to be in the bottom middle or bottom left?
Then I installed pie control app, this works too but it doesn't have the option of autohiding softkeys at the bottom.
Is there something else I could try, I just need back software button elsewhere then bottom right corner and not all the time. Can it be achieved?
Thx again for helping...
Click to expand...
Click to collapse
No mate you cannot directly edit the on-screen button's configurations and functions from Settings.. you need to decompile and modify certain files in your framework-res.apk.. I guess it will be too complicated for you to do all that - so it would be better for you to not try it now and end up getting a bootloop (no offence)
The only reason why I don't use on-screen buttons is because of this only.. It takes up screen's space and there is no auto-hide option...
And which Pie Control app did you install? Give this is a try if you still haven't tried it... As far as I know, Pie controls only appear when you tap and hold on a certain part of your screen...
If you don't want to use your on-screen buttons then just remove the line from your build.prop or set its value to 1... And if you don't want your phone's capacitive buttons to light up then you can turn that off from Settings > Display > Touch key light duration and set it to "always off".. It won't disable them BUT it will not light them up..
I tried exactly the same pie control app you've posted, found it by searching.
But I also uninstalled it afterwards, pie is working fine but I can't auto hide soft keys at the bottom, so when pie is active and visible, soft keys at the bottom are also visible. Which is not what I wanted at the 1st place.
So at the end I commented the line in build.prop and reverted to the way it was before, cause A) space is more important to me, and B) soft back key is again on bottom right.
In the meantime, if someone runs into solution for simulating only back key with adjustable position... kindly let me know...

Categories

Resources