How to adjust constraint layout to scroll view to fit all screen?












0














I have problem in the bottom layout where my constraint layout does not fill the scroll view entirely(blank space bellow). This is the image evidence of the problem.
In this case I want the gray background to fill that white space below. I tried match parent in everything but it does not work.



enter image description here



This is my xml file that belongs to the layout I uploaded



<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/layout">

<data>
<variable
name="viewModel"
type="com.repsol.repsolmove.ui.login.LoginViewModel" />
</data>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.core.widget.NestedScrollView
android:id="@+id/scrolView"
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<ImageView
android:id="@+id/imageView"
android:layout_width="174dp"
android:layout_height="70dp"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="3dp"
android:src="@drawable/ic_img_logo_repsolmove"
app:layout_constraintBottom_toTopOf="@+id/imageBottomMargin"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />


<com.repsol.repsolmove.ui.widgets.RepsolInputLayout
android:id="@+id/login"
android:layout_width="0dp"
android:layout_height="105dp"
android:layout_marginTop="30dp"
app:errorText="@string/invalid_card_number"
app:layout_constraintEnd_toStartOf="@+id/marginEnd"
app:layout_constraintStart_toStartOf="@+id/marginStart"
app:layout_constraintTop_toBottomOf="@+id/imageView"
app:titleText="@string/login_title" />

<com.repsol.repsolmove.ui.widgets.RepsolInputLayout
android:id="@+id/password"
android:layout_width="0dp"
android:layout_height="105dp"
app:errorText="@string/invalid_password"
app:isPassword="true"
app:layout_constraintEnd_toStartOf="@+id/marginEnd"
app:layout_constraintStart_toStartOf="@+id/marginStart"
app:layout_constraintTop_toBottomOf="@+id/login"
app:titleText="@string/password_title" />


<TextView
android:id="@+id/newPassword"
style="@style/RepsolText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginEnd="8dp"
android:fontFamily="@font/repsol_regular"
android:text="@string/new_password"
android:textSize="16dp"
app:layout_constraintEnd_toStartOf="@+id/marginEnd"
app:layout_constraintTop_toBottomOf="@+id/password" />

<Button
android:id="@+id/btnLogin"
android:layout_width="228dp"
android:layout_height="50dp"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="8dp"
android:background="@drawable/shape_rounded_fill_rectangle"
android:fontFamily="@font/repsol_regular"
android:text="@string/login"
android:textAllCaps="false"
android:textColor="@android:color/white"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/newPassword" />

<Button
android:id="@+id/btnJoin"
android:layout_width="0dp"
android:layout_height="51dp"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="32dp"
android:background="@drawable/shape_rounded_rectangle"
android:fontFamily="@font/repsol_regular"
android:text="@string/join"
android:textAllCaps="false"
android:textColor="@color/colorPrimaryDark"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/btnNologin"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="@+id/marginStart"
app:layout_constraintTop_toBottomOf="@+id/btnLogin"
app:layout_constraintVertical_bias="0.75" />


<Button
android:id="@+id/btnNologin"
android:layout_width="0dp"
android:layout_height="51dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="32dp"
android:background="@drawable/shape_rounded_no_stroke_rectangle"
android:fontFamily="@font/repsol_regular"
android:text="@string/enter_without_login"
android:textAllCaps="false"
android:textColor="@color/colorPrimaryDark"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/marginEnd"
app:layout_constraintStart_toEndOf="@+id/btnJoin"
app:layout_constraintTop_toBottomOf="@+id/btnLogin"
app:layout_constraintVertical_bias="0.75" />


<androidx.constraintlayout.widget.Guideline
android:id="@+id/imageBottomMargin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.30" />


<androidx.constraintlayout.widget.Guideline
android:id="@+id/marginStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.10" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/marginEnd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.90" />


<com.repsol.repsolmove.ui.widgets.RepsolDialog
android:id="@+id/dialog"
android:layout_width="match_parent"
android:layout_height="0dp"
android:elevation="10dp"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />


<include
android:id="@+id/loading"
layout="@layout/loading"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />


</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>









share|improve this question



























    0














    I have problem in the bottom layout where my constraint layout does not fill the scroll view entirely(blank space bellow). This is the image evidence of the problem.
    In this case I want the gray background to fill that white space below. I tried match parent in everything but it does not work.



    enter image description here



    This is my xml file that belongs to the layout I uploaded



    <?xml version="1.0" encoding="utf-8"?>
    <layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/layout">

    <data>
    <variable
    name="viewModel"
    type="com.repsol.repsolmove.ui.login.LoginViewModel" />
    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.core.widget.NestedScrollView
    android:id="@+id/scrolView"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.constraintlayout.widget.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
    android:id="@+id/imageView"
    android:layout_width="174dp"
    android:layout_height="70dp"
    android:layout_marginStart="8dp"
    android:layout_marginTop="16dp"
    android:layout_marginEnd="8dp"
    android:layout_marginBottom="3dp"
    android:src="@drawable/ic_img_logo_repsolmove"
    app:layout_constraintBottom_toTopOf="@+id/imageBottomMargin"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />


    <com.repsol.repsolmove.ui.widgets.RepsolInputLayout
    android:id="@+id/login"
    android:layout_width="0dp"
    android:layout_height="105dp"
    android:layout_marginTop="30dp"
    app:errorText="@string/invalid_card_number"
    app:layout_constraintEnd_toStartOf="@+id/marginEnd"
    app:layout_constraintStart_toStartOf="@+id/marginStart"
    app:layout_constraintTop_toBottomOf="@+id/imageView"
    app:titleText="@string/login_title" />

    <com.repsol.repsolmove.ui.widgets.RepsolInputLayout
    android:id="@+id/password"
    android:layout_width="0dp"
    android:layout_height="105dp"
    app:errorText="@string/invalid_password"
    app:isPassword="true"
    app:layout_constraintEnd_toStartOf="@+id/marginEnd"
    app:layout_constraintStart_toStartOf="@+id/marginStart"
    app:layout_constraintTop_toBottomOf="@+id/login"
    app:titleText="@string/password_title" />


    <TextView
    android:id="@+id/newPassword"
    style="@style/RepsolText"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="24dp"
    android:layout_marginEnd="8dp"
    android:fontFamily="@font/repsol_regular"
    android:text="@string/new_password"
    android:textSize="16dp"
    app:layout_constraintEnd_toStartOf="@+id/marginEnd"
    app:layout_constraintTop_toBottomOf="@+id/password" />

    <Button
    android:id="@+id/btnLogin"
    android:layout_width="228dp"
    android:layout_height="50dp"
    android:layout_marginStart="8dp"
    android:layout_marginTop="32dp"
    android:layout_marginEnd="8dp"
    android:background="@drawable/shape_rounded_fill_rectangle"
    android:fontFamily="@font/repsol_regular"
    android:text="@string/login"
    android:textAllCaps="false"
    android:textColor="@android:color/white"
    android:textSize="16sp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/newPassword" />

    <Button
    android:id="@+id/btnJoin"
    android:layout_width="0dp"
    android:layout_height="51dp"
    android:layout_marginStart="8dp"
    android:layout_marginTop="32dp"
    android:layout_marginEnd="16dp"
    android:layout_marginBottom="32dp"
    android:background="@drawable/shape_rounded_rectangle"
    android:fontFamily="@font/repsol_regular"
    android:text="@string/join"
    android:textAllCaps="false"
    android:textColor="@color/colorPrimaryDark"
    android:textSize="16sp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toStartOf="@+id/btnNologin"
    app:layout_constraintHorizontal_chainStyle="packed"
    app:layout_constraintStart_toStartOf="@+id/marginStart"
    app:layout_constraintTop_toBottomOf="@+id/btnLogin"
    app:layout_constraintVertical_bias="0.75" />


    <Button
    android:id="@+id/btnNologin"
    android:layout_width="0dp"
    android:layout_height="51dp"
    android:layout_marginStart="16dp"
    android:layout_marginTop="16dp"
    android:layout_marginEnd="8dp"
    android:layout_marginBottom="32dp"
    android:background="@drawable/shape_rounded_no_stroke_rectangle"
    android:fontFamily="@font/repsol_regular"
    android:text="@string/enter_without_login"
    android:textAllCaps="false"
    android:textColor="@color/colorPrimaryDark"
    android:textSize="16sp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toStartOf="@+id/marginEnd"
    app:layout_constraintStart_toEndOf="@+id/btnJoin"
    app:layout_constraintTop_toBottomOf="@+id/btnLogin"
    app:layout_constraintVertical_bias="0.75" />


    <androidx.constraintlayout.widget.Guideline
    android:id="@+id/imageBottomMargin"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    app:layout_constraintGuide_percent="0.30" />


    <androidx.constraintlayout.widget.Guideline
    android:id="@+id/marginStart"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    app:layout_constraintGuide_percent="0.10" />

    <androidx.constraintlayout.widget.Guideline
    android:id="@+id/marginEnd"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    app:layout_constraintGuide_percent="0.90" />


    <com.repsol.repsolmove.ui.widgets.RepsolDialog
    android:id="@+id/dialog"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:elevation="10dp"
    android:visibility="visible"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintTop_toTopOf="parent" />


    <include
    android:id="@+id/loading"
    layout="@layout/loading"
    android:visibility="gone"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />


    </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.core.widget.NestedScrollView>
    </androidx.constraintlayout.widget.ConstraintLayout>
    </layout>









    share|improve this question

























      0












      0








      0







      I have problem in the bottom layout where my constraint layout does not fill the scroll view entirely(blank space bellow). This is the image evidence of the problem.
      In this case I want the gray background to fill that white space below. I tried match parent in everything but it does not work.



      enter image description here



      This is my xml file that belongs to the layout I uploaded



      <?xml version="1.0" encoding="utf-8"?>
      <layout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/layout">

      <data>
      <variable
      name="viewModel"
      type="com.repsol.repsolmove.ui.login.LoginViewModel" />
      </data>

      <androidx.constraintlayout.widget.ConstraintLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent">

      <androidx.core.widget.NestedScrollView
      android:id="@+id/scrolView"
      android:layout_width="match_parent"
      android:layout_height="match_parent">

      <androidx.constraintlayout.widget.ConstraintLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent">

      <ImageView
      android:id="@+id/imageView"
      android:layout_width="174dp"
      android:layout_height="70dp"
      android:layout_marginStart="8dp"
      android:layout_marginTop="16dp"
      android:layout_marginEnd="8dp"
      android:layout_marginBottom="3dp"
      android:src="@drawable/ic_img_logo_repsolmove"
      app:layout_constraintBottom_toTopOf="@+id/imageBottomMargin"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" />


      <com.repsol.repsolmove.ui.widgets.RepsolInputLayout
      android:id="@+id/login"
      android:layout_width="0dp"
      android:layout_height="105dp"
      android:layout_marginTop="30dp"
      app:errorText="@string/invalid_card_number"
      app:layout_constraintEnd_toStartOf="@+id/marginEnd"
      app:layout_constraintStart_toStartOf="@+id/marginStart"
      app:layout_constraintTop_toBottomOf="@+id/imageView"
      app:titleText="@string/login_title" />

      <com.repsol.repsolmove.ui.widgets.RepsolInputLayout
      android:id="@+id/password"
      android:layout_width="0dp"
      android:layout_height="105dp"
      app:errorText="@string/invalid_password"
      app:isPassword="true"
      app:layout_constraintEnd_toStartOf="@+id/marginEnd"
      app:layout_constraintStart_toStartOf="@+id/marginStart"
      app:layout_constraintTop_toBottomOf="@+id/login"
      app:titleText="@string/password_title" />


      <TextView
      android:id="@+id/newPassword"
      style="@style/RepsolText"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginTop="24dp"
      android:layout_marginEnd="8dp"
      android:fontFamily="@font/repsol_regular"
      android:text="@string/new_password"
      android:textSize="16dp"
      app:layout_constraintEnd_toStartOf="@+id/marginEnd"
      app:layout_constraintTop_toBottomOf="@+id/password" />

      <Button
      android:id="@+id/btnLogin"
      android:layout_width="228dp"
      android:layout_height="50dp"
      android:layout_marginStart="8dp"
      android:layout_marginTop="32dp"
      android:layout_marginEnd="8dp"
      android:background="@drawable/shape_rounded_fill_rectangle"
      android:fontFamily="@font/repsol_regular"
      android:text="@string/login"
      android:textAllCaps="false"
      android:textColor="@android:color/white"
      android:textSize="16sp"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toBottomOf="@+id/newPassword" />

      <Button
      android:id="@+id/btnJoin"
      android:layout_width="0dp"
      android:layout_height="51dp"
      android:layout_marginStart="8dp"
      android:layout_marginTop="32dp"
      android:layout_marginEnd="16dp"
      android:layout_marginBottom="32dp"
      android:background="@drawable/shape_rounded_rectangle"
      android:fontFamily="@font/repsol_regular"
      android:text="@string/join"
      android:textAllCaps="false"
      android:textColor="@color/colorPrimaryDark"
      android:textSize="16sp"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toStartOf="@+id/btnNologin"
      app:layout_constraintHorizontal_chainStyle="packed"
      app:layout_constraintStart_toStartOf="@+id/marginStart"
      app:layout_constraintTop_toBottomOf="@+id/btnLogin"
      app:layout_constraintVertical_bias="0.75" />


      <Button
      android:id="@+id/btnNologin"
      android:layout_width="0dp"
      android:layout_height="51dp"
      android:layout_marginStart="16dp"
      android:layout_marginTop="16dp"
      android:layout_marginEnd="8dp"
      android:layout_marginBottom="32dp"
      android:background="@drawable/shape_rounded_no_stroke_rectangle"
      android:fontFamily="@font/repsol_regular"
      android:text="@string/enter_without_login"
      android:textAllCaps="false"
      android:textColor="@color/colorPrimaryDark"
      android:textSize="16sp"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toStartOf="@+id/marginEnd"
      app:layout_constraintStart_toEndOf="@+id/btnJoin"
      app:layout_constraintTop_toBottomOf="@+id/btnLogin"
      app:layout_constraintVertical_bias="0.75" />


      <androidx.constraintlayout.widget.Guideline
      android:id="@+id/imageBottomMargin"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="horizontal"
      app:layout_constraintGuide_percent="0.30" />


      <androidx.constraintlayout.widget.Guideline
      android:id="@+id/marginStart"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      app:layout_constraintGuide_percent="0.10" />

      <androidx.constraintlayout.widget.Guideline
      android:id="@+id/marginEnd"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      app:layout_constraintGuide_percent="0.90" />


      <com.repsol.repsolmove.ui.widgets.RepsolDialog
      android:id="@+id/dialog"
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:elevation="10dp"
      android:visibility="visible"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintTop_toTopOf="parent" />


      <include
      android:id="@+id/loading"
      layout="@layout/loading"
      android:visibility="gone"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" />


      </androidx.constraintlayout.widget.ConstraintLayout>
      </androidx.core.widget.NestedScrollView>
      </androidx.constraintlayout.widget.ConstraintLayout>
      </layout>









      share|improve this question













      I have problem in the bottom layout where my constraint layout does not fill the scroll view entirely(blank space bellow). This is the image evidence of the problem.
      In this case I want the gray background to fill that white space below. I tried match parent in everything but it does not work.



      enter image description here



      This is my xml file that belongs to the layout I uploaded



      <?xml version="1.0" encoding="utf-8"?>
      <layout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/layout">

      <data>
      <variable
      name="viewModel"
      type="com.repsol.repsolmove.ui.login.LoginViewModel" />
      </data>

      <androidx.constraintlayout.widget.ConstraintLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent">

      <androidx.core.widget.NestedScrollView
      android:id="@+id/scrolView"
      android:layout_width="match_parent"
      android:layout_height="match_parent">

      <androidx.constraintlayout.widget.ConstraintLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent">

      <ImageView
      android:id="@+id/imageView"
      android:layout_width="174dp"
      android:layout_height="70dp"
      android:layout_marginStart="8dp"
      android:layout_marginTop="16dp"
      android:layout_marginEnd="8dp"
      android:layout_marginBottom="3dp"
      android:src="@drawable/ic_img_logo_repsolmove"
      app:layout_constraintBottom_toTopOf="@+id/imageBottomMargin"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" />


      <com.repsol.repsolmove.ui.widgets.RepsolInputLayout
      android:id="@+id/login"
      android:layout_width="0dp"
      android:layout_height="105dp"
      android:layout_marginTop="30dp"
      app:errorText="@string/invalid_card_number"
      app:layout_constraintEnd_toStartOf="@+id/marginEnd"
      app:layout_constraintStart_toStartOf="@+id/marginStart"
      app:layout_constraintTop_toBottomOf="@+id/imageView"
      app:titleText="@string/login_title" />

      <com.repsol.repsolmove.ui.widgets.RepsolInputLayout
      android:id="@+id/password"
      android:layout_width="0dp"
      android:layout_height="105dp"
      app:errorText="@string/invalid_password"
      app:isPassword="true"
      app:layout_constraintEnd_toStartOf="@+id/marginEnd"
      app:layout_constraintStart_toStartOf="@+id/marginStart"
      app:layout_constraintTop_toBottomOf="@+id/login"
      app:titleText="@string/password_title" />


      <TextView
      android:id="@+id/newPassword"
      style="@style/RepsolText"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginTop="24dp"
      android:layout_marginEnd="8dp"
      android:fontFamily="@font/repsol_regular"
      android:text="@string/new_password"
      android:textSize="16dp"
      app:layout_constraintEnd_toStartOf="@+id/marginEnd"
      app:layout_constraintTop_toBottomOf="@+id/password" />

      <Button
      android:id="@+id/btnLogin"
      android:layout_width="228dp"
      android:layout_height="50dp"
      android:layout_marginStart="8dp"
      android:layout_marginTop="32dp"
      android:layout_marginEnd="8dp"
      android:background="@drawable/shape_rounded_fill_rectangle"
      android:fontFamily="@font/repsol_regular"
      android:text="@string/login"
      android:textAllCaps="false"
      android:textColor="@android:color/white"
      android:textSize="16sp"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toBottomOf="@+id/newPassword" />

      <Button
      android:id="@+id/btnJoin"
      android:layout_width="0dp"
      android:layout_height="51dp"
      android:layout_marginStart="8dp"
      android:layout_marginTop="32dp"
      android:layout_marginEnd="16dp"
      android:layout_marginBottom="32dp"
      android:background="@drawable/shape_rounded_rectangle"
      android:fontFamily="@font/repsol_regular"
      android:text="@string/join"
      android:textAllCaps="false"
      android:textColor="@color/colorPrimaryDark"
      android:textSize="16sp"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toStartOf="@+id/btnNologin"
      app:layout_constraintHorizontal_chainStyle="packed"
      app:layout_constraintStart_toStartOf="@+id/marginStart"
      app:layout_constraintTop_toBottomOf="@+id/btnLogin"
      app:layout_constraintVertical_bias="0.75" />


      <Button
      android:id="@+id/btnNologin"
      android:layout_width="0dp"
      android:layout_height="51dp"
      android:layout_marginStart="16dp"
      android:layout_marginTop="16dp"
      android:layout_marginEnd="8dp"
      android:layout_marginBottom="32dp"
      android:background="@drawable/shape_rounded_no_stroke_rectangle"
      android:fontFamily="@font/repsol_regular"
      android:text="@string/enter_without_login"
      android:textAllCaps="false"
      android:textColor="@color/colorPrimaryDark"
      android:textSize="16sp"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toStartOf="@+id/marginEnd"
      app:layout_constraintStart_toEndOf="@+id/btnJoin"
      app:layout_constraintTop_toBottomOf="@+id/btnLogin"
      app:layout_constraintVertical_bias="0.75" />


      <androidx.constraintlayout.widget.Guideline
      android:id="@+id/imageBottomMargin"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="horizontal"
      app:layout_constraintGuide_percent="0.30" />


      <androidx.constraintlayout.widget.Guideline
      android:id="@+id/marginStart"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      app:layout_constraintGuide_percent="0.10" />

      <androidx.constraintlayout.widget.Guideline
      android:id="@+id/marginEnd"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      app:layout_constraintGuide_percent="0.90" />


      <com.repsol.repsolmove.ui.widgets.RepsolDialog
      android:id="@+id/dialog"
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:elevation="10dp"
      android:visibility="visible"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintTop_toTopOf="parent" />


      <include
      android:id="@+id/loading"
      layout="@layout/loading"
      android:visibility="gone"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" />


      </androidx.constraintlayout.widget.ConstraintLayout>
      </androidx.core.widget.NestedScrollView>
      </androidx.constraintlayout.widget.ConstraintLayout>
      </layout>






      android android-linearlayout android-constraintlayout






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 12 '18 at 14:34









      José Nobre

      16213




      16213
























          1 Answer
          1






          active

          oldest

          votes


















          2














          Add this attribute to your NestScrollView element in xml file



          android:fillViewport="true"





          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53264365%2fhow-to-adjust-constraint-layout-to-scroll-view-to-fit-all-screen%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            Add this attribute to your NestScrollView element in xml file



            android:fillViewport="true"





            share|improve this answer


























              2














              Add this attribute to your NestScrollView element in xml file



              android:fillViewport="true"





              share|improve this answer
























                2












                2








                2






                Add this attribute to your NestScrollView element in xml file



                android:fillViewport="true"





                share|improve this answer












                Add this attribute to your NestScrollView element in xml file



                android:fillViewport="true"






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 12 '18 at 14:39









                Ramzy Hassan

                314214




                314214






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53264365%2fhow-to-adjust-constraint-layout-to-scroll-view-to-fit-all-screen%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    這個網誌中的熱門文章

                    Xamarin.form Move up view when keyboard appear

                    Post-Redirect-Get with Spring WebFlux and Thymeleaf

                    Anylogic : not able to use stopDelay()