Scrollview没有';不显示完整内容[Android]
我对Android上的Scrollview有问题。问题在于以注册表形式显示所有内容 XML布局Scrollview没有';不显示完整内容[Android],android,android-layout,uiscrollview,scrollview,Android,Android Layout,Uiscrollview,Scrollview,我对Android上的Scrollview有问题。问题在于以注册表形式显示所有内容 XML布局 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/app_background"
tools:context=".RegisterActivity"
xmlns:tools="http://schemas.android.com/tools">
<ScrollView
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:paddingLeft="10dp"
android:paddingRight="10dp"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/register_header"
android:textSize="30sp"
android:textColor="#000000"
android:textStyle="bold"
android:layout_marginBottom="30dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/register_loginField"
android:textColor="#000000"
android:textStyle="bold"
android:textSize="18sp"
android:layout_marginBottom="8dp"
/>
<EditText
android:id="@+id/register_input_email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:textColor="#000000"
android:hint="@string/hint_login"
android:layout_marginBottom="20dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/register_password"
android:textColor="#000000"
android:textStyle="bold"
android:textSize="18sp"
android:layout_marginBottom="20dp"
/>
<EditText
android:id="@+id/register_input_passw"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:textColor="#000000"
android:hint="@string/hint_passw"
android:layout_marginBottom="20dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/register_repeatpass"
android:textColor="#000000"
android:textStyle="bold"
android:textSize="18sp"
android:layout_marginBottom="20dp"
/>
<EditText
android:id="@+id/register_input_passwre"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:textColor="#000000"
android:hint="@string/hint_passw"
android:layout_marginBottom="20dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/register_gender"
android:textColor="#000000"
android:textStyle="bold"
android:textSize="18sp"
android:layout_marginBottom="20dp"
/>
<RadioGroup
android:id="@+id/register_radiog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<RadioButton
android:id="@+id/register_radioM"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/register_gMale"
android:textSize="16sp"
/>
<RadioButton
android:id="@+id/register_radioF"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/register_gFemale"
android:textSize="16sp"
android:layout_marginBottom="20dp"
/>
</RadioGroup>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/register_name"
android:textColor="#000000"
android:textStyle="bold"
android:textSize="18sp"
/>
<EditText
android:id="@+id/register_input_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:textColor="#000000"
android:hint="@string/hint_name"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/register_age"
android:textColor="#000000"
android:textStyle="bold"
android:textSize="18sp"
/>
<EditText
android:id="@+id/register_input_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:textColor="#000000"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<CheckBox
android:id="@+id/register_input_termsofuse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/register_termsofuse"
android:textSize="16sp"
android:textColor="#000000"
android:textStyle="bold"/>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/register_btSignup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="#fc9a24"
android:paddingLeft="30dp"
android:paddingRight="30dp"
android:text="@string/register_btSignup"
android:textStyle="bold"
android:textSize="16sp"
android:textColor="#FFFFFF"
/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
但是当我在Android设备中执行时,我看不到register_头文本视图
此外,当我点击一个EditText时,我的设备会显示键盘,所有视图都会向上推,隐藏更多项目(电子邮件文本视图和EditText)
我怎样才能解决这个问题
在第一幅图中,正如您所看到的,标题没有显示。这很糟糕
在第二幅图中,我可以滚动并看到注册按钮,这很好
在第三幅图中,当键盘出现,我进入scrollview的顶部时,我看不到register_标题、电子邮件输入和电子邮件文本视图
我如何确定布局位置(当键盘出现时不向上推)并显示Scrollview中的所有内容
Thx将其添加到清单中的活动中
<activity android:windowSoftInputMode="adjustPan"> </activity>
“活动”的主窗口的大小不会调整为“活动”腾出空间
键盘而是自动平移窗口的内容
因此,键盘和用户永远不会模糊当前的焦点
可以随时查看他们正在键入的内容。这通常不太可取
而不是调整大小,因为用户可能需要关闭软键盘
获取并与窗口的模糊部分交互
不起作用,当我点击出生日期输入(在复选框之前输入)时,仍然会向上推布局,而且我仍然无法通过电子邮件文本视图看到阅读器标题。