0

AVD「Google API レベル 11」(プラットフォーム 3.0) を実行していますが、ログイン アクティビティがエミュレータの画面領域全体を占めていない理由を理解したいと考えています。適切な場所で fill_parent を使用しています。横向きでは問題ないようです。以下を参照してください

http://www.akersacademy.com/images/robert/landscape.png

縦向きでは、エミュレーターを使用する余地がありますが、ヘルプ ボタンがクリップされているようです (クエスチョン マークの画像)。

http://www.akersacademy.com/images/robert/portrait.png

これが私のlogin_activity.xmlファイルです。何が起こっているのか誰でも助けてくれますか

<LinearLayout
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    android:orientation="vertical"
    android:layout_gravity="center_vertical">


    <ImageView  android:layout_width="fill_parent" 
                    android:src="@drawable/wfm_login_v2"                        
                    android:layout_height="wrap_content"/>

    <TableLayout            
        android:stretchColumns="1"          
        android:layout_height="wrap_content" 
        android:layout_width="fill_parent"
        android:layout_gravity="center">

        <TableRow>
            <TextView android:text="@string/loginActivityUserId"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:textSize="24sp" 
                android:gravity="right"/>

            <EditText 
                android:layout_height="wrap_content"
                android:layout_width="fill_parent" />

            <ImageButton 
                android:id="@+id/loginHelpButton"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:src="@drawable/question" />

        </TableRow>

        <TableRow>
            <TextView android:text="@string/loginActivityPassword"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:textSize="24.5sp" />

            <EditText 
                android:layout_width="fill_parent" android:layout_height="wrap_content"/>

            <ImageView 
                android:layout_height="fill_parent"
                android:layout_width="fill_parent"
                android:src="@drawable/black_32x32" />
        </TableRow>

        <TableRow>

                <TextView android:text=""
                    android:layout_height="wrap_content"
                    android:layout_width="wrap_content" />

                <LinearLayout
                    android:layout_height="wrap_content"
                    android:layout_width="fill_parent"
                    android:orientation="horizontal"
                    android:gravity="right"
                    android:weightSum="10">
                    <Button android:text="Login"
                            android:layout_height="wrap_content"
                            android:layout_width="wrap_content" 
                            android:layout_weight="5"
                            android:textSize="24.5sp"/>
                    <Button android:text="Cancel"
                            android:layout_height="wrap_content"
                            android:layout_width="wrap_content"
                            android:layout_weight="5"
                            android:textSize="24.5sp"/>
                </LinearLayout>

                <ImageView 
                    android:layout_height="fill_parent"
                    android:layout_width="fill_parent"
                    android:src="@drawable/black_32x32" />

        </TableRow>

</TableLayout>

</LinearLayout>

4

1 に答える 1

1

あなたのコンポーネントは、その上にある WFM-PDA の境界線と完全に一致しているようです。あなたが持っているすべての画面資産ではありませんか? 実際のデバイスではどのように見えますか?

それとは別に-ここで腰から撮影しています:TableLayoutでandroid:shrinkColumns = "*"を設定してみてください。役立つかどうかを確認してください...

また、AndroidManifest.xml ファイルを確認してください。supports-screen-attribute で何かできるかもしれません。

<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:resizeable="true"/>
于 2011-06-19T00:01:42.077 に答える