2010-03-28 17 views

cevap

6

Aşağıdaki örnek ile deneyebilirsiniz ...

if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { 
    // You can set the value initially by 
    // ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED. Once set it 
    // retains it's value. The View will be rendered in the specified 
    // orientation using the code below. 
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); 
} 
10

bu deneyin:

Activity.setRequestedOrientation() 

bu parametrelerle:

ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE 
ActivityInfo.SCREEN_ORIENTATION_PORTRAIT 

kontrol this fazla referans için

+0

Ekranı nasıl döndürüyorsunuz? Emulator – Pentium10

+3

Numpad'de Home ve PageUp, ancak önce numlock aldığınızdan emin olun. OSX'de –

+0

Ctrl + F11 :) – systempuntoout

İlgili konular