0

私は Android アプリケーションを持っていますが、動作します。1 つのアクティビティには、シンプルな EditText と Button があります。そのため、EditText をクリックすると、キーボードが表示されますが、ボタン上にあります。私はこれを望んでいません。キーボードが表示されているときにコンポーネントの上に移動できるかどうかわかりません。

これは AndroidManifest のコードです。

<activity
   android:name="com.bioresult.geopointer.activity.settingActivity"
   android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
   android:windowSoftInputMode="stateVisible|adjustResize"
   android:configChanges="orientation|screenSize">            
</activity>

これはアクティビティのコードです:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" 
    android:background="#4d4d4d"
    android:gravity="center_horizontal"
    android:baselineAligned="false">

    <LinearLayout 
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="vertical"
        android:layout_gravity="center_vertical|center_horizontal"
        android:gravity="center_vertical|center_horizontal"
        android:layout_margin="15dp">

        <EditText
           android:id="@+id/editTextPartitaIva" 
           android:layout_width="match_parent"
           android:layout_height="wrap_content"
           android:hint="@string/nomeAzienda"
           android:lines="1"
           android:singleLine="true"/>   

        <Button 
           android:id="@+id/buttonSalva" 
           android:layout_width="match_parent"
           android:layout_height="40dp"
           android:layout_marginTop="15dp"
           android:textColor="#FFFFFF"
           android:text="@string/salva"
           android:textSize="20sp"
           android:onClick="salva"
           android:background="@drawable/salva_partitaiva_button"
           />
    </LinearLayout>



</LinearLayout>
4

1 に答える 1

1

https://code.google.com/p/android/issues/detail?id=5497

それを避けるにFullScreenは、アクティビティのテーマを削除してください

FLAG_FULLSCREENから

ウィンドウ フラグ: このウィンドウが表示されている間、すべての画面装飾 (ステータス バーなど) を非表示にします。これにより、ウィンドウが表示スペース全体を使用できるようになります。このフラグが設定されたアプリ ウィンドウが最上位レイヤーにある場合、ステータス バーは非表示になります。フルスクリーン ウィンドウは、ウィンドウの softInputMode フィールドの SOFT_INPUT_ADJUST_RESIZE の値を無視します。ウィンドウはフルスクリーンのままで、サイズは変更されません。

于 2015-01-30T14:25:32.443 に答える