The truth is I have some basic knowledge in Android programming and others. I am making an application in Android Studio that tries to make a main screen so that a teacher and parent can register and log in. In the activity in which the parent registers I have many EditText
and some RadioButton
, and each of them in several LinearLayout
s to maintain a better order. That's why I tried to put a ScrollView
so you can go down the screen.
The problem is that I already implemented it, enclosing everything that I need to be Scroll and it does not work. I also declared the parent container as Scroll and it does not work either; when installing the APK on my Moto G to test it, the ScrollView
does not work.
This is the XML File:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:background="#3399cc"
android:orientation="vertical"
tools:context="joinder.proyecto.Main_formulario_padre">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="136dp"
android:orientation="vertical"
android:background="#ffffff">
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp">
<EditText
android:id="@+id/editText4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:scrollbars="vertical"
android:focusable="true"
android:hint="Nombre :"
android:inputType="textPersonName"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp">
<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:scrollbars="vertical"
android:focusable="true"
android:hint="Apellido :"
android:inputType="textPersonName"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp">
<EditText
android:id="@+id/editText5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:scrollbars="vertical"
android:focusable="true"
android:hint="Correo :"
android:inputType="textEmailAddress" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp">
<EditText
android:id="@+id/editText6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:scrollbars="vertical"
android:focusable="true"
android:hint="Telefono :"
android:inputType="phone" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp">
<EditText
android:id="@+id/editText7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:scrollbars="vertical"
android:focusable="true"
android:hint="Contraseña :"
android:inputType="textPassword" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp">
<EditText
android:id="@+id/editText12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:scrollbars="vertical"
android:focusable="true"
android:hint="Repetir Contraseña :"
android:inputType="textPassword" />
</android.support.design.widget.TextInputLayout>
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:scrollbars="vertical"
android:gravity="center_vertical"
android:padding="10dp">
<RadioButton
android:id="@+id/radioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Padre"
android:checked="false"
android:onClick="OnRadioButtonClicked"/>
<RadioButton
android:id="@+id/radioButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Madre"
android:checked="false"
android:onClick="OnRadioButtonClicked"/>
<RadioButton
android:id="@+id/radioButton3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Acudiente"
android:checked="false"
android:onClick="OnRadioButtonClicked"/>
</RadioGroup>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp"
android:scrollbars="vertical"
android:textColor="#ffffff"
android:background="@drawable/border_radius_2"/>
</LinearLayout>
</ScrollView>
</LinearLayout>
The ScrollView
tag can already see that the platform automatically skips it; it's just before you start the first LinearLayout
.
I hope you can help me.