- 没有键盘的注册用户界面
我尝试输入电子邮件,然后键盘出现并且电子邮件字段不可见
这是我的注册布局文件:
<?xml version="1.0" encoding="utf-8"?> <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:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:fillViewport="true" android:isScrollContainer="true"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical|center_horizontal" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerInParent="true" android:orientation="vertical"> <EditText android:id="@+id/sign_up_email_input" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="20dp" android:layout_marginRight="20dp" android:layout_marginTop="10dp" android:background="@drawable/capsule_shape" android:drawableLeft="@drawable/email_image" android:drawablePadding="10dp" android:fontFamily="sans-serif" android:hint="@string/input_mail" android:inputType="textEmailAddress" android:paddingLeft="20dp" android:textSize="16sp" /> <Button android:id="@+id/signup_button" android:layout_width="120dp" android:layout_height="40dp" android:layout_gravity="center_horizontal" android:background="@drawable/capsule_button" android:text="@string/btn_sign_text" android:textAllCaps="false" android:textColor="@color/white" /> </LinearLayout> </RelativeLayout> </ScrollView>
我已经使用上述布局 xml 文件来设计注册 UI。email field not visible
而且,当键盘存在时,我遇到了问题。请帮我解决这个问题。