It is very simple to use the Nook Simple Touch's page turn buttons in your Android application. All you have to do is add some code to your onKeyDown method. I also created a helpful diagram that shows which keycode corresponds to which button.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Code:
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
int keyCodeNum;
keyCodeNum = event.getKeyCode();
switch (keyCodeNum){
case 92:
\\Do something when top left page button is pressed
break;
case 93:
\\Do something when the bottom left page button is pressed
break;
case 94:
\\Do something when the top right page button pressed
break;
case 95:
\\Do something when the bottom right page button pressed
break;
}
return false;
}
The onKeyDown method won't be in a new project by default. The method can be inserted in Android Studio by pressed Alt + Insert, selecting "Override methods..." and typing "onKeyDown" until you find the method.
I created a sample application demonstrating how to use the page buttons in the way I described. You can get the source here and compile it yourself if you want.
Related
I have found a way to enable quick app switching (or what ever it is called) in the Mango emulator. It seems to be a little bit buggy but it works. Here is a screenshot:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Here is the how to:
1. Press [Windows]+[R]. A "Run" dialog should appear.
2. Now type in "notepad %programfiles%\Microsoft XDE\1.0\WM7_Skin.xml"
3. Find
Code:
<button
toolTip="Back"
onClick="0x3B"
mappingColor="0xF7941D"
/>
and replace onClick="0x3B" with onPressAndHold="0x3B" so it would look like this:
Code:
<button
toolTip="Back"
onPressAndHold="0x3B"
mappingColor="0xF7941D"
/>
4. Now start your emulator and press and hold the back button
Thanks but Why don't you just hold f1 button?
I didn't know about F1!
This does not work for me. I have the Mango emulator but the folder you said to that the .xml is in does not exist
Badcam3 said:
This does not work for me. I have the Mango emulator but the folder you said to that the .xml is in does not exist
Click to expand...
Click to collapse
maybe you got windows 64 bit
then replace %programfiles% with %programfiles(x86)%
so the path then should be C:\Program Files (x86)\Microsoft XDE\1.0\WM7_skin.xml
[WP proposal has been submitted] 'left longitudinal axis letter navigation "! Hope you come help me to vote!
I believe most people think that the WP application list is also not perfect the user experience, application installations greater than 45, there will be "letter navigation" and that "the letter navigation" seems convenient, but there are two disadvantages (people still need to click 3 times and the slide-down list to locate the program to find and occupy a separate line so many letters list should show the location of the application name), not to mention the application of search, enter the letters had to locate,
Here, I propose a total of two, I believe we can improve or enhance the user experience WP:
1. "Virtual button search" instead of "physical search button" (optional)
2. "Navigation on the left vertical axis of the letter" + "list of applications displayed on the right", left-handed operation more convenient, the program needs to quickly locate the right application list shows more content!
Here is the effect of preview:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is a voting address:
http://windowsphone.uservoice.com/f...lication-list-letter-navigation-to-improve-an
Hope you picked up in the hands of the mouse, quickly vote now, so that the early advent of convenient and practical to improve our WP platform it !!!!!
I hope that we can give the greatest support
Voted! I like the idea #2
I just made these for myself, and I liked the way they came out, so I figured I'd share. Inspiration came from seeing my friends new droid 4.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Included in the .zip are the following files:
*Not a flashable zip, these must be added to your SystemUI.apk, search bar location is dependent on your rom*
Code:
ic_search_land.png ic_sysbar_home.png
ic_search.png ic_sysbar_lights_out_dot_large.png
ic_sysbar_back_land.png ic_sysbar_lights_out_dot_small.png
ic_sysbar_back.png ic_sysbar_menu_land.png
ic_sysbar_highlight_land.png ic_sysbar_menu.png
ic_sysbar_highlight.png ic_sysbar_recent_land.png
ic_sysbar_home_land.png ic_sysbar_recent.png
Download:
http://www.mediafire.com/?08033839ppl6zm9
If you included a search button as well, I'd be in.
make the whole set i dont even use the menu key
daman215 said:
make the whole set i dont even use the menu key
Click to expand...
Click to collapse
What do you mean by the whole set? I'm using the menu key as the recent apps button. I'll add the 3 dot 'menu' key I made along with the landscape png's as soon as I finish them.
Edit: Updated OP, added all necessary files/.zip with all .png's
take screenshot without application:
press home button + power button simultaneously.....
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
lastly.. see the screenshot at your gallery
nice!!! Thx!
We got that earlier.....thanx anyway!!!!
http://forum.xda-developers.com/showthread.php?p=24139369
Sent from my SGW GT-I8150 using Tapatalk!!
Don't forget that we already have the long dedicated thread for this:
How to make a screenshot without using any 3rd party apps.
There is especially very useful the latest post from irishpancake, because some people have problem with pressing two buttons simultaneously:
http://forum.xda-developers.com/showpost.php?p=24139369&postcount=28
The best procedure how to make the snapshot is:
Put your thumb fingers on both buttons and first press Home button and leave it pressed and after a fraction of second press Power button with your other thumb finger. Then release both buttons. With a fraction second I mean max 0.1 second.
Don't press buttons in the reverse order (first Power button and then Home button), because although you make the snapshot you invoke Power menu too.
wow
Thanks! ^^
I really like the "Use for all screens" One-handed operation, but unfortunately I use a few apps which requires a "Accessibility Service" which, turns out, breaks the gesture for One-handed operation (please fix this Samsung!)... So my question is... Can that feature be accessed via an app, or another method other then the "swipe" gesture?
dansl said:
I really like the "Use for all screens" One-handed operation, but unfortunately I use a few apps which requires a "Accessibility Service" which, turns out, breaks the gesture for One-handed operation (please fix this Samsung!)... So my question is... Can that feature be accessed via an app, or another method other then the "swipe" gesture?
Click to expand...
Click to collapse
This doesn't answer your question, but addresses overall one-handed operation.
Given that it's a bit of a strain to reach across the screen with my thumb (the back button, for example), this is one of the first things I installed
If you haven't used it, it's called LMT Pie. I set the targets to left, right and bottom. You can customize it as much as you want. FWIW..
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}