3

I was trying to build a simple web page for Android that has two different layouts depending on the orientation. I used the emulator to test the page: Android emulator version 7.0 (build_id OPENMASTER-53891) on Mac.

I tried the CSS media query orientation: and also the JavaScript method but to no avail: when I changed the orientation on the emulator, nothing happened. Is this because of the emulator i.e. the emulator browser doesn't properly work upon orientation change?

Community
  • 1
  • 1
moey
  • 10,587
  • 25
  • 68
  • 112
  • I tried using a newer emulator i.e. Android emulator version 11.0 (build_id OPENMASTER-123211), but still didn't work. :( – moey Jul 06 '11 at 05:54

2 Answers2

3

Have you tried to change orientation of your monitor?

Just kidding :-) Try this combination of keys on your computer:

Switch to previous layout orientation (for example, portrait, landscape) , Ctrl-F11 Switch to next layout orientation (for example, portrait, landscape) , Ctrl-F12

kikoso
  • 673
  • 1
  • 6
  • 17
  • 1
    That's what I did to change the emulator orientation: Ctrl+Apple+F11. However, nothing changed in terms of the layout / CSS. – moey Jul 05 '11 at 13:07
0

Did you create layout and layout-land directories?

And make sure that the activity doesn't have the tag

android:configChanges="orientation"

on the manifest.

Chronos
  • 1,972
  • 17
  • 22