1

私は800x420とギャラクシーslとs2モバイルで私のアプリケーションをテストします。ギャラクシーslでは、[テキストの編集]を押すとキーボードが表示されますが、背景画像は圧縮されていませんが、ギャラクシーs2では圧縮されています。どちらも同じサイズで、galaxyslはジンジャーブレッドを使用しています。

これが私のコードです

 <?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/page1background"
    android:paddingRight="@dimen/padding_large" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="196dp"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:gravity="center_horizontal"
        android:paddingTop="@dimen/padding_Title_Top"
        android:text="@string/text"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/textView1"
        android:layout_centerHorizontal="true" >

        <View
            android:id="@+id/view1"
            android:layout_width="fill_parent"
            android:layout_height="25dp" />
    </LinearLayout>

    <ScrollView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_above="@id/linearLayout2"
        android:layout_below="@id/linearLayout1"
        android:layout_gravity="center"
        android:padding="@dimen/padding_maintextview" >

        <LinearLayout
            android:id="@+id/linearLayout5"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <EditText
                android:id="@+id/textView2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginBottom="23dp"
                android:background="@null"
                android:focusableInTouchMode="false"
                android:gravity="right"
                android:inputType="none"
                android:padding="@dimen/padding_maintextview"
                android:text="@string/text"
                android:textAppearance="?android:attr/textAppearanceMedium" />
        </LinearLayout>
    </ScrollView>

    <LinearLayout
        android:id="@+id/linearLayout2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true" >

        <View
            android:id="@+id/view2"
            android:layout_width="fill_parent"
            android:layout_height="100dp" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/linearLayout3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true" >

        <ImageButton
            android:id="@+id/back_arrow"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_marginBottom="30dp"
            android:layout_marginRight="45dp"
            android:layout_weight=".5"
            android:background="@drawable/backbut"
            android:contentDescription="@string/Description"
            android:onClick="onClickBtn"
            android:src="@drawable/backarrowpress" />

        <ImageButton
            android:id="@+id/copyButton"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_marginLeft="45dp"
            android:layout_weight=".5"
            android:background="@drawable/copy"
            android:contentDescription="@string/Description"
            android:onClick="onClickBtn" />
    </LinearLayout>

</RelativeLayout>

誰かが私がこれを修正するのを手伝ってくれるなら。事前にt​​hx

4

2 に答える 2

0

こんにちは、manifest.xmlのアクティビティタグにandroid:windowSoftInputMode="adjustPan"を追加してみてください。

以下のように

        <activity
            android:name=".youractivitywhichyouhaveproblem" android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
于 2012-11-23T07:45:54.133 に答える