1
I have a screen with a Fragment, that without being expanded, it just shows the user and password field and the sign up button, and I wanted that when I expanded it, fields like name, date of birth, municipality, state, were inserted between the password field and the sign up button, remembering that it expands when the user is included in the user field.
XML from Fragment ta thus:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView android:id="@+id/login_form" android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout android:id="@+id/email_novo_form" android:layout_width="match_parent"
android:layout_height="wrap_content" android:orientation="vertical">
<android.support.design.widget.TextInputLayout android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText android:id="@+id/campoEmailNovoUsuario" android:layout_width="match_parent"
android:layout_height="wrap_content" android:hint="@string/prompt_email"
android:inputType="textEmailAddress" android:maxLines="1"
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content" android:hint="@string/prompt_password"
android:imeActionId="@+id/login"
android:imeActionLabel="@string/action_sign_in_short"
android:imeOptions="actionUnspecified" android:inputType="textPassword"
android:maxLines="1" android:singleLine="true"
android:id="@+id/campoSenhaNovo" />
</android.support.design.widget.TextInputLayout>
<CheckBox
android:id="@+id/chk_mostrar_senha"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/chk_mostrar_senha"/>
<TextView
android:id="@+id/texto_termos_criar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textAlignment="center"/>
<Button android:id="@+id/email_criar_button" style="?android:textAppearanceSmall"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:text="@string/acao_nova_conta"
android:textStyle="bold"
android:textColor="@color/branco"
android:background="@drawable/botao_arredondado"
android:gravity="center_horizontal|center_vertical"
android:layout_gravity="center_horizontal" />
</LinearLayout>
</ScrollView>
that’s all