携帯電話アプリをタブレット(XOOM)で全画面全体を記入させるにはどうすればよいですか。
-
29-10-2019 - |
質問
私は私のアプリケーションをXoomタブレットに実行しようとし、それは携帯電話の正確なサイズの携帯電話(画面全体に記入しない)であることを終えようとしました。
だから、私は故障画像と中央の進行状況バーを示すような非常に簡単にプロジェクトを作成しました。下の写真で見ることができるように、私は同じ結果がありました:
XOOM - 小さな画面http://raphaeu.com/gvt/imagem.jpg
だから、タブレットの画面全体を記入するために私のレイアウトを書くのでしょうか?
これは私のマニフェストです:
<?xml version="1.0" encoding="utf-8"?>
.
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".MainActivity"
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>
.
これはmirse.xmlレイアウトです:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/splash_portrait">
<ProgressBar
style="?android:progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
/>
</RelativeLayout>
.
とここに見たい場合は、ここにプロジェクト全体があります。 http://raphaeu.com/gvt/xoom.zip
事前にありがとうございました!!
解決
これをマニフェストに追加します..
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="false" />
.
詳細は詳細です... http://developer.android.com/guide/practices/screens-distribution.html.
他のヒント
高さと幅に「fill_parent」を使用するようにxmlレイアウトを調整してみてください。wrap_contentを使用すると、使用可能な画面サイズに合わせて拡大するのではなく、必要なだけのスペースを占めるようにビューに指示します。
所属していません StackOverflow