- 论坛徽章:
- 0
|
Hello Android fans and developers. I'd like to share with you some emulator skins I created for the
Google Android SDK
. They are tested to work with the latest Android SDK version 1.0r1.
Installation of new Skins
Using a blank screen as Skin
Changing the window size of the Android Emulator
Controlling the Android Emulator through keyboard keys
Creating an SD card for use in Android Emulator
Installation of new Skins
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.
Using a blank screen as 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 x.
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.
Changing the window size of the Android Emulator
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 .
Controlling the Android Emulator through keyboard keys
Keypad keys only work when NumLock is deactivated.
Controls for the Android OS
Keyboard
OS function
EscapeBack button
HomeHome button
F2, PageUpMenu (Soft-Left) button
Shift-F2, PageDownStar (Soft-Right) button
F3Call/Dial button
F4Hangup/EndCall button
F5Search button
F7Power button
Ctrl-F3, Ctrl-KEYPAD_5Camera button
Ctrl-F5, KEYPAD_PLUSVolume up button
Ctrl-F6, KEYPAD_MINUSVolume down button
KEYPAD_5DPad center
KEYPAD_4DPad left
KEYPAD_6DPad right
KEYPAD_8DPad up
KEYPAD_2DPad down
Controls for the Android Emulator
Keyboard
Emulator function
F8toggle cell network on/off
F9toggle code profiling (when -trace option set)
Alt-ENTERtoggle fullscreen mode
Ctrl-Ttoggle trackball mode
Ctrl-F11, KEYPAD_7switch to previous layout
Ctrl-F12, KEYPAD_9switch to next layout
KEYPAD_MULTIPLYincrease onion alpha
KEYPAD_DIVIDEdecrease onion alpha
Creating an SD card for use in Android Emulator
To create an image of an SD card we use the command mksdcard -l [K|M] .
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.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/85805/showart_1897159.html |
|