我有一個活動中顯示的佈局。當我將它運行在集團上時,它佔用了整個屏幕,但是當我在droid 3上運行它時,在底部和兩側都有一個黑色條。我如何使它成爲整個屏幕?我以爲android應該爲你做這個嗎?在android中調整大小問題
更新:
我只是設置活動的內容查看這樣的:
activity.setContentView(R.layout.home);
繼承人的XML:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/home_screen_lay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/home_screen">
</RelativeLayout>
繼承人我的清單:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapp"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Viewer"
android:label="@string/app_name"
android:configChanges="orientation|keyboard|keyboardHidden"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Heres ap icture:
你可以看到它不會調整。
如果有人需要了,我可以再次更新。
它應該這樣做,至少如果你問得好。你是否將佈局設置爲整個屏幕?發佈你的佈局代碼可能會有所幫助。 –
你可以發佈你用來定義你的佈局的代碼嗎? – slayton
'@ drawable/home_screen'是什麼? – Michael