res/layout/main_activity.xml
res/layout-small/main_activity.xml
res/layout-large/main_activity.xml
res/layout-xlarge/main_activity.xml
res/layout-xlarge-land/main_activity.xml我有两个布局文件具有相同的名称,但不同的文本信息。当我尝试在Samsung-Galaxy 10.1 or Google Nexus 7英寸平板电脑或密度为1024dp * 600dp的模拟器中加载应用程序时,它总是加载res/layout/main_activity.xml
我不确定我在这里犯了什么错误。下面是清单文件。
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sample"
android:versionCode="2"
android:versionName="2.3.4" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="15" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >
<activity
android:name=".Splash"
android:label="@string/title_activity_splash"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Trial"
android:label="@string/title_activity_trial"
android:exported="false"
>
<intent-filter>
<action android:name="com.sample.TRIAL" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>我使用的是4.1.1.4版本的android.jar。
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>发布于 2012-10-17 00:22:04
根据this chart,1024x600被归类为xlarge。您的<support-screens>标记中没有提到xlarge。
https://stackoverflow.com/questions/12918710
复制相似问题