2012-02-15 6 views
0

ここではたくさんの質問があります。私はGoogleで数百ページを見てきたが、私のアプリは、ランドスケープモードに滞在しないだろう、なぜ正確に特定することはできません。アプリがタブレットで回転しているときに風景にとどまっていない... Android 4.0

マニフェスト:

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="-------------" 
    android:versionCode="1" 
    android:versionName="1.0"> 
<uses-sdk android:minSdkVersion="10" /> 

<uses-permission android:name="android.permission.INTERNET"/> 

<application android:icon="@drawable/icon" android:label="@string/app_name" 
    android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" 
    android:configChanges="keyboardHidden|orientation" 
    android:screenOrientation="landscape" > 
    <activity android:name="---------Activity" 
       android:label="@string/app_name"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 
      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 

</application> 

Main.xml:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:configChanges="keyboardHidden|orientation" 
    android:screenOrientation="landscape" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent"> 
<WebView android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:configChanges="keyboardHidden|orientation" 
    android:screenOrientation="landscape" 
    android:id="@+id/mainWebView"> 
</WebView> 

これは、1つのWebView ...

とだけのアプリです

答えて

1

android:screenOrientation="landscape"AndroidManifestの活性に加える。例:

<activity android:name=".SomeActivity" 
android:label="@string/app_name" 
android:screenOrientation="landscape"> 
+0

ありがとうございました! – Jessica

1

各アクティビティには、android:screenOrientationを設定する必要があります。代わりに、アプリケーションでそれをやっています。 また、screenOrientationとconfigChangesはレイアウトxmlファイルに対しては何も行いません。

+0

私に言ってくれてありがとう、意味がある。 – Jessica

関連する問題