moey
moey

Reputation: 10887

Android Emulator: Orientation Change

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?

Upvotes: 3

Views: 1015

Answers (2)

Chronos
Chronos

Reputation: 1962

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.

Upvotes: 0

kikoso
kikoso

Reputation: 708

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

Upvotes: 3

Related Questions