0

I have seen several topics of this but none works for me, I would like to ask if anyone has any idea what I am doing wrong. I'm a beginner, this is my first project in android studio.

I've already tried adding padding bottom or margin and it doesn't work.

I also read that NestedScrollView will be used but as you can see I'm using it and it doesn't handle me correctly.

THE SCROLL IS ONLY SHOWN WITH THE LANDSCAPE VIEW

<ImageView
    android:id="@+id/btnBack"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginStart="32dp"
    android:layout_marginTop="24dp"
    android:clickable="true"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:srcCompat="?attr/actionModeCloseDrawable" />

<TextView
    android:id="@+id/textView4"
    android:layout_width="104dp"
    android:layout_height="17dp"
    android:layout_marginTop="24dp"
    android:layout_marginEnd="8dp"
    android:text="Ya tengo cuenta"
    app:layout_constraintEnd_toStartOf="@+id/textView5"
    app:layout_constraintTop_toTopOf="parent" />

<TextView
    android:id="@+id/textView5"
    android:layout_width="90dp"
    android:layout_height="17dp"
    android:layout_marginTop="24dp"
    android:layout_marginEnd="16dp"
    android:text="Iniciar sesión"
    android:textColor="#FFC107"
    android:textStyle="bold"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

<TextView
    android:id="@+id/textView6"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="72dp"
    android:paddingLeft="32dp"
    android:text="Empecemos."
    android:textSize="30sp"
    android:textStyle="bold"
    app:layout_constraintTop_toBottomOf="@+id/textView4"
    tools:layout_editor_absoluteX="0dp" />

<androidx.core.widget.NestedScrollView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingLeft="32dp"
    android:paddingRight="32dp"
    app:layout_constraintTop_toBottomOf="@id/textView6"
    android:stackFromBottom="true"
    android:transcriptMode="alwaysScroll"
    tools:layout_editor_absoluteX="32dp">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <EditText
            android:id="@+id/TextPersonName"
            style="@style/Widget.AppCompat.EditText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:layout_marginBottom="16dp"
            android:background="@drawable/edit_round"
            android:ems="10"
            android:hint="Nombre"
            android:inputType="textPersonName"
            android:paddingLeft="10dp"
            android:textAlignment="textStart" />

        <EditText
            android:id="@+id/textLastName"
            style="@style/Widget.AppCompat.EditText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="16dp"
            android:background="@drawable/edit_round"
            android:ems="10"
            android:hint="Apellido"
            android:paddingLeft="10dp"
            android:textAlignment="textStart" />

        <EditText
            android:id="@+id/textEmail"
            style="@style/Widget.AppCompat.EditText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="16dp"
            android:background="@drawable/edit_round"
            android:ems="10"
            android:hint="Email"
            android:inputType="textEmailAddress"
            android:paddingLeft="10dp"
            android:textAlignment="textStart" />

        <EditText
            android:id="@+id/textPassword"
            style="@style/Widget.AppCompat.EditText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="16dp"
            android:background="@drawable/edit_round"
            android:ems="10"
            android:hint="Contraseña"
            android:inputType="textPassword"
            android:paddingLeft="10dp"
            android:textAlignment="textStart" />

        <EditText
            android:id="@+id/textPasswordRepeat"
            style="@style/Widget.AppCompat.EditText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="16dp"
            android:background="@drawable/edit_round"
            android:ems="10"
            android:hint="Confirma la contraseña"
            android:inputType="textPassword"
            android:paddingLeft="10dp"
            android:textAlignment="textStart" />

        <EditText
            android:id="@+id/textPhone"
            style="@style/Widget.AppCompat.EditText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="16dp"
            android:background="@drawable/edit_round"
            android:ems="10"
            android:hint="Teléfono"
            android:inputType="phone"
            android:paddingLeft="10dp"
            android:textAlignment="textStart" />

        <Button
            android:id="@+id/buttonContinuar"
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:layout_marginBottom="16dp"
            android:background="@drawable/btnpurple"
            android:backgroundTint="#292929"
            android:text="Continuar"
            android:textColor="#FFFFFF"
            android:textSize="12sp" />

        <Button
            android:id="@+id/buttonContinuarGoogle"
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:layout_marginBottom="16dp"
            android:background="@drawable/btnpurple"
            android:backgroundTint="#FF9800"
            android:text="Continuar con Google"
            android:textColor="#FFFFFF"
            android:textSize="12sp" />

        <Button
            android:id="@+id/buttonContinuarFacebook"
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:background="@drawable/btnpurple"
            android:backgroundTint="#4680C6"
            android:text="Continuar con Facebook"
            android:textColor="#FFFFFF"
            android:textSize="12sp"
            tools:ignore="MissingConstraints" />

    </LinearLayout>
</androidx.core.widget.NestedScrollView>
Nayan Sarder
  • 553
  • 1
  • 3
  • 15

2 Answers2

0

Dude there in the code you have not shown what type of layout you are using (or what the root of the layout is), depending on the type of layout there are different adding margin at the bottom in general this serves ->

android: layout_marginBottom = "Xpx" where X -> is the size... for example -> "10px"

NestedScrollView as the name suggests is used when there is a need for a scrolling view inside another scrolling view. Normally this would be difficult to accomplish since the system would be unable to decide which view to scroll.

This is where NestedScrollView comes in

0

Nested scroll views are used when you want to add another scrollView inside a scrollView read this answer. So you might want to use just the scrollView instead.

Dharman
  • 21,838
  • 18
  • 57
  • 107