Android 虚拟键盘出现后编辑文本几乎不可见

Android 虚拟键盘出现后编辑文本几乎不可见,android,Android,如两个截图所示,我在活动布局中有3个编辑文本。 当我触摸第一条信息1时,虚拟键盘会如预期的那样出现。 尽管如此,第一次编辑的文本现在似乎几乎看不见了 以下是我的布局xml: <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent

如两个截图所示,我在活动布局中有3个编辑文本。 当我触摸第一条信息1时,虚拟键盘会如预期的那样出现。 尽管如此,第一次编辑的文本现在似乎几乎看不见了

以下是我的布局xml:

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.n.MainActivity" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical" 
            android:layout_gravity="center">

            <View
                android:layout_width="1dp"
                android:layout_height="30dp" >
            </View>

            <EditText
                android:id="@+id/message1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:ems="10"
                android:hint="Message1"
                android:gravity="center"
                android:singleLine="true"
                android:ellipsize="end" />

            <View
                android:layout_width="1dp"
                android:layout_height="30dp" >
            </View>

            <EditText
                android:id="@+id/message2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:ems="10"
                android:hint="Message2"
                android:gravity="center"
                android:singleLine="true"
                android:ellipsize="end" />

            <View
                android:layout_width="1dp"
                android:layout_height="30dp" >
            </View>

            <EditText
                android:id="@+id/sw"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:ems="10"
                android:hint="sw"
                android:gravity="center"
                android:singleLine="true"
                android:ellipsize="end" />

            <View
                android:layout_width="1dp"
                android:layout_height="30dp" >
            </View>

            <Button
                android:id="@+id/d"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="25dip"
                android:layout_marginRight="25dip"
                android:text="d"
                android:drawablePadding="10dip"
                android:layout_gravity="center" />

            <View
                android:layout_width="1dp"
                android:layout_height="200dp" >
            </View>

        </LinearLayout>

</ScrollView>
请帮助解决此不良UI行为

问候,

PS:不要让虚拟键盘ios的定制设计误导你。我们在这里谈论的是安卓,这个问题甚至在定制之前就已经发生了


尝试将其添加到清单文件下的相关活动:

android:windowSoftInputMode="stateAlwaysHidden|adjustPan"