分类: LINUX
2009-04-10 22:48:01
Hello Android fans and developers. I'd like to share with you some emulator skins I created for the . They are tested to work with the latest Android SDK version 1.0r1.
Unpack the .zip file and copy the created directory and files to ./tools/lib/images/skins/
within the installation directory of the Android SDK.
If you have eclipse running restart it to refresh the list of available screen sizes in the run configuration.
Go to -> Run -> Run Configurations... -> Target -> Emulator launch parameters and choose your new skin.
If you are not in the need
for fancy devices showing in the emulator window, want to waste as
little screen property as possible for the emulator and are prepared to
use the keyboard shortcuts to maneuver the emulated Android device, then you may start the emulator adding the simple command line option -skin
.
For example, using the option -skin 320x480
will provide you with a small window in the standard resolution of the HTC Dream / T-Mobile G1.
This is a great and fast way to test various display resolutions without the need for a dedicated skin to be created first.
For those of you developing on a typical notebook the skins with resolutions of VGA and above may produce an emulator window that doesn't fit onto the desktop anymore. Since using a skin with a lower resolution might position the Android screen objects in a different way it may not desirable to retreat to those if testing is needed for high resolution devices.
The solution is to append the parameter -scale
to the Emulator launch parameters. In eclipse, put it in the field
"Additional Emulator Command Line Options" within the Run Configuration.
Allowed scale factors are those between 0.1 and 3, although the most common will probably be -scale 0.5
.
Keypad keys only work when NumLock is deactivated.
Keyboard | OS function |
---|---|
Escape | Back button |
Home | Home button |
F2, PageUp | Menu (Soft-Left) button |
Shift-F2, PageDown | Star (Soft-Right) button |
F3 | Call/Dial button |
F4 | Hangup/EndCall button |
F5 | Search button |
F7 | Power button |
Ctrl-F3, Ctrl-KEYPAD_5 | Camera button |
Ctrl-F5, KEYPAD_PLUS | Volume up button |
Ctrl-F6, KEYPAD_MINUS | Volume down button |
KEYPAD_5 | DPad center |
KEYPAD_4 | DPad left |
KEYPAD_6 | DPad right |
KEYPAD_8 | DPad up |
KEYPAD_2 | DPad down |
Keyboard | Emulator function |
---|---|
F8 | toggle cell network on/off |
F9 | toggle code profiling (when -trace option set) |
Alt-ENTER | toggle fullscreen mode |
Ctrl-T | toggle trackball mode |
Ctrl-F11, KEYPAD_7 | switch to previous layout |
Ctrl-F12, KEYPAD_9 | switch to next layout |
KEYPAD_MULTIPLY | increase onion alpha |
KEYPAD_DIVIDE | decrease onion alpha |
To create an image of an SD card we use the command mksdcard -l
.
For example, to create a small SD card for testing purposes we might use the command mksdcard -l SD256M 256M sd256m.img
to receive a 256MB image named sd256m.img. The resulting file is a
standard FAT32 image file that can be mounted as such and prefilled
with files we later want to use within Android. To tell the Android
Emulator to use an SD card, we append the parameter -sdcard
to the emulator command line options where "imagefile" includes the whole path to the file.