How-To: Display Emulator in Landscape (Sideways) View?

by JLMG » Thu, 12 Mar 2009 06:41:06 GMT

Sponsored Links
 I was over at db4o and they had a demo with the emulator displayed in
landscape (sideways) mode.

How do you do that?

I'm developing and app that needs the keyboard exposed.



How-To: Display Emulator in Landscape (Sideways) View?

by Mark Murphy » Thu, 12 Mar 2009 06:41:50 GMT


<Ctrl>-<F12> toggles you between portrait and landscape modes in the

Mark Murphy (a Commons Guy) 
Android Training in Sweden -- 


Sponsored Links

Other Threads

1. I can't use my Google account to post question at Android Developers


I can't use my Google account to post questions at Android Developers
(Google Groups).

I don't know why since I got my Google account:
I've joined Google Groups of Android Developers.

But when I click the button of "Post message" to post, it shows my
message would be posted momentarily.
However, I still can't see my messages after several hours later.

Shall I do anything to post messages?

Many thanks,

Mars Alucard


2. How to use IOCTL() to access H/W, via Sahred Library + JNI or else, in Android applications?


In my Android application, I need to use IOCTL() to do I2C R/W

My native C application could do it successfully, no matter by
standalone or dynamically linking .so, but...
ioctl() returns -1 when Android application loads shared library (.so)
and calls the function including ioctl() via JNI.

Could Android application directly use ioctl() in shared library (.so)
thruogh JNI with any tips?

Or, if Android application needs to use ioctl() in native C code,
could some methods help to do this?
(Like Service Manager, Binder, Android source code, or something

I've tried to find articles for several days to solve this issue, but
still get no ideas now.

(Followings are the environment and testing steps for my trials.)

1. Testing Steps for Native C Application on Android (Successful)
(1) Chiefly I want to execute the two statements below on Android:

unsigned int hI2C = open("/dev/i2c-2", O_RDWR);
int retI2C = ioctl(hI2C, I2C_SLAVE, 0x0C);

(2) A native C application is compiled on Ubuntu, and then put to
(3) The native C application could work well to open I2C and bind/read/
write I2C slave address 0x0C.
Even more, the native C application could dynamically link the shared
library (.so) in 2. (1) below,
and then call JNI function to execute the statements in 1. (1) above

2. Testing Steps for Android Application with JNI + Shared Library .so
(1) I make a shared library (.so) with JNI, including the statements
in 1. (1) above, by the commands below:

~/arm-2007q3/bin/arm-none-linux-gnueabi-gcc -I/usr/lib/jvm/java-6-sun/
include -I/usr/lib/jvm/java-6-sun/include/linux -fpic -c XXX.c
~/arm-2007q3/bin/arm-none-linux-gnueabi-ld -T ~/arm-2007q3/arm-none-
linux-gnueabi/lib/ldscripts/armelf_linux_eabi.xsc -shared -o

(2) An Android application is compiled by Eclipse on WIN32, with a few
system-level permission. (enabled by "uses-permission")
(3) Then put the Android application (.apk) and shared library (.so)
to Beagle/G1, with chmod 777.
(4) Run the Android application, to load the shared library and call
JNI function to execute the statements in 1. (1) above.
(5) The Android application could load the shared library, call JNI
functions, and execute almost all statements well, BUT...
(6) When the Android application call JNI function to execute ioctl(),
ioctl() return -1, which means FAILED.

3. Environment
(1) Platform: Android @ T1 OMAP Beagle Board & Google Phone
(2) WIN32: JDK v1.60_12 & Eclipse v3.42 (with a few system-level
permissions enabled by "uses-permission")
(3) Linux: Ubuntu & JDK v1.60_10 & arm-2007q3 ( with arm-non-linux-

Many thanks,

Mars Alucard


3. Want a cheap G1?

4. Accessing raw resource files with the filename as a String

5. porting to Toshiba Portege G500

6. help !!!! the problem for can't start the emulator

7. How to test the earpiece