柔软的。键盘封面在被解雇后但未在

时间:2015-08-03 22:45:29

标签: android keyboard android-scrollview android-relativelayout

首次打开应用程序并选择我的EditText时,会出现软件键盘并且视图会向上滚动以为键盘腾出空间 - 应该如此。但是一旦我用向下箭头关闭键盘然后再次选择EditText,键盘就会隐藏EditText。

View BEFORE Keyboard dismissed View AFTER Keyboard dismissed

我已尝试将活动设置为全屏,将RelativeLayout更改为ScrollView,并将android:windowSoftInputMode设置为"adjust Pan"

<RelativeLayout 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:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context="org.example.TheApp.LaunchActivity"
    android:background="#333333">
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginTop="30dp"
    android:gravity="center_horizontal"
    android:orientation="vertical"
    android:id="@+id/prefixLL"
    android:weightSum="1">

<ImageView
    android:layout_width="250dp"
    android:layout_height="250dp"
    android:id="@+id/imageView"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="10dp"
    android:src="@drawable/image_audio"
    android:layout_marginBottom="75dp" />

<EditText
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:hint="@string/prefixHint"
    android:textColorHint="#EBEBEB"
    android:ems="10"
    android:id="@+id/prefixTextField"
    android:layout_gravity="center_horizontal"
    android:autoText="false"
    android:imeOptions="actionGo"
    android:textSize="25dp"
    android:background="#5A595B"
    android:textColor="#F5F5F5"
    android:gravity="center"
    android:inputType="textVisiblePassword" />

</LinearLayout>

</RelativeLayout>

0 个答案:

没有答案