Currently , I have a layout using the constraintLayout like the following
As you see, I divide the checkbox in each section with 10% width using vertical guideline. However, the total of the checkedboxs will be changed due to the user request. That's mean it may show 4 or 3 checkbox in one row.
At this moment, I want to divide the width with weight rather than setting the hard-code percentage. What I should do for this?
Appreciate any comment or advices. Thank you
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/worklist_normal_row_bg">
<TextView
android:id="#+id/textView97"
style="#style/label_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="8dp"
android:text="TextView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginLeft="8dp" />
<TextView
android:id="#+id/textView102"
style="#style/label_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_marginStart="8dp"
android:text="TextView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView97"
android:layout_marginLeft="8dp" />
<TextView
android:id="#+id/textView103"
style="#style/label_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
app:layout_constraintStart_toEndOf="#+id/textView102"
app:layout_constraintTop_toTopOf="#+id/textView97"/>
<TextView
android:id="#+id/textView104"
style="#style/label_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="TextView"
android:textSize="14sp"
app:layout_constraintBaseline_toBaselineOf="#+id/textView102"
app:layout_constraintStart_toStartOf="#+id/guideline12"
android:layout_marginLeft="8dp" />
<CheckBox
android:id="#+id/checkBox2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:text=" "
app:layout_constraintBaseline_toBaselineOf="#+id/textView103"
app:layout_constraintStart_toStartOf="#+id/guideline12"
tools:checked="true" />
<CheckBox
android:id="#+id/checkBox4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" "
app:layout_constraintBaseline_toBaselineOf="#+id/checkBox2"
app:layout_constraintStart_toEndOf="#+id/checkBox2"
tools:checked="true" />
<CheckBox
android:id="#+id/checkBox5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" "
app:layout_constraintBaseline_toBaselineOf="#+id/checkBox4"
app:layout_constraintStart_toEndOf="#+id/checkBox4"
tools:checked="true" />
<CheckBox
android:id="#+id/checkBox6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" "
app:layout_constraintBaseline_toBaselineOf="#+id/checkBox5"
app:layout_constraintStart_toEndOf="#+id/checkBox5"
tools:checked="true" />
<CheckBox
android:id="#+id/checkBox7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" "
app:layout_constraintBaseline_toBaselineOf="#+id/checkBox6"
app:layout_constraintStart_toEndOf="#+id/checkBox6"
tools:checked="true" />
<TextView
android:id="#+id/textView105"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginTop="8dp"
android:background="#color/worklist_divider_bg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView104" />
<android.support.constraint.Guideline
android:id="#+id/guideline11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.3" />
<android.support.constraint.Guideline
android:id="#+id/guideline12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5" />
</android.support.constraint.ConstraintLayout>
Try this.
<android.support.constraint.ConstraintLayout
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:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/color_bg_rcl">
<TextView
android:id="#+id/textView97"
style="#style/label_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="TextView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="#+id/textView102"
style="#style/label_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:text="TextView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView97" />
<TextView
android:id="#+id/textView103"
style="#style/label_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
app:layout_constraintStart_toEndOf="#+id/textView102"
app:layout_constraintTop_toTopOf="#+id/textView97" />
<TextView
android:id="#+id/textView104"
style="#style/label_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:text="TextView"
android:textSize="14sp"
app:layout_constraintBaseline_toBaselineOf="#+id/textView102"
app:layout_constraintStart_toStartOf="#+id/guideline12" />
<CheckBox
android:id="#+id/checkBox2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" "
app:layout_constraintLeft_toRightOf="#+id/guideline12"
app:layout_constraintRight_toLeftOf="#+id/checkBox4"
tools:checked="true" />
<CheckBox
android:id="#+id/checkBox4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" "
app:layout_constraintLeft_toRightOf="#+id/checkBox2"
app:layout_constraintRight_toLeftOf="#+id/checkBox5"
tools:checked="true" />
<CheckBox
android:id="#+id/checkBox5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" "
app:layout_constraintLeft_toRightOf="#+id/checkBox4"
app:layout_constraintRight_toLeftOf="#+id/checkBox6"
tools:checked="true" />
<CheckBox
android:id="#+id/checkBox6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" "
app:layout_constraintLeft_toRightOf="#+id/checkBox5"
app:layout_constraintRight_toLeftOf="#+id/checkBox7"
tools:checked="true" />
<CheckBox
android:id="#+id/checkBox7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" "
app:layout_constraintLeft_toRightOf="#+id/checkBox6"
app:layout_constraintRight_toRightOf="parent"
tools:checked="true" />
<TextView
android:id="#+id/textView105"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginTop="8dp"
android:background="#color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView104" />
<android.support.constraint.Guideline
android:id="#+id/guideline11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="108dp" />
<android.support.constraint.Guideline
android:id="#+id/guideline12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5" />
</android.support.constraint.ConstraintLayout>
Related
How can I make such a RadioButton in Android.
I made Layout like this, but I think it can somehow be done using the RadioButton class itself. I tried to add child to RadioButton tag but it threw exception
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RadioButton
android:id="#+id/rb1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="#+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:text="John Dore"
app:layout_constraintBottom_toTopOf="#+id/textView2"
app:layout_constraintStart_toEndOf="#+id/rb1"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Score: 11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="#+id/textView"
app:layout_constraintTop_toBottomOf="#+id/textView" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:text="Rate: 3"
app:layout_constraintStart_toEndOf="#+id/textView2"
app:layout_constraintTop_toBottomOf="#+id/textView" />
</androidx.constraintlayout.widget.ConstraintLayout>
You can create a xml and use it with a recyclerView.
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:layout_editor_absoluteX="112dp"
tools:layout_editor_absoluteY="61dp"
>
<RadioButton
android:id="#+id/radioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:orientation="vertical">
<TextView
android:id="#+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="John Dore" />
<TextView
android:id="#+id/textDetails"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="Score: 11 Rate: 3" />
</LinearLayout>
</LinearLayout>
This is my first ask on StackOverflow. a Greetings.
I am using Android Studio, I'm trying to make a Layout that the textView is just below and centered on another TextView. Actually, I have it like this.
Want to ask how I can do something like this:
To center it and be "responsive" with the superior text view. Thank you so much.
this is the code:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:padding="#dimen/activity_horizontal_margin">
<ImageView
android:id="#+id/imgPartidasRecomendaciones"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="#dimen/activity_horizontal_margin"
android:src="#drawable/ic_star" />
<TextView
android:id="#+id/tv_perfil_partidasJugadas"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="#dimen/activity_horizontal_margin"
android:layout_toEndOf="#id/imgPartidasRecomendaciones"
android:background="#android:color/transparent"
android:text="Partidas"
android:textAppearance="#style/TextAppearance.AppCompat.Small"
android:textColor="#727272" />
<TextView
android:id="#+id/tv_perfil_recomendaciones"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="60dp"
android:layout_toEndOf="#id/tv_perfil_partidasJugadas"
android:background="#android:color/transparent"
android:text="Recomendaciones"
android:textAppearance="#style/TextAppearance.AppCompat.Small"
android:textColor="#727272" />
<TextView
android:id="#+id/tv_partidasJugadasNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/tv_perfil_partidasJugadas"
android:layout_alignParentBottom="true"
android:layout_marginStart="#dimen/activity_horizontal_margin"
android:layout_toEndOf="#id/imgPartidasRecomendaciones"
android:layout_marginBottom="10dp"
android:text="0"
android:textAlignment="center"
android:textAppearance="#style/TextAppearance.AppCompat.Medium"
android:textColor="#212121"
android:textSize="20sp" />
<TextView
android:id="#+id/tv_recomendacionesNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/tv_perfil_partidasJugadas"
android:layout_alignParentBottom="true"
android:layout_marginStart="60dp"
android:layout_toEndOf="#id/tv_partidasJugadasNumber"
android:layout_marginBottom="10dp"
android:text="0"
android:textAlignment="center"
android:textAppearance="#style/TextAppearance.AppCompat.Medium"
android:textColor="#212121"
android:textSize="20sp" />
</RelativeLayout>
The solution is to wrap each pair of TextViews inside a vertical LinearLayout:
<ImageView
android:id="#+id/imgPartidasRecomendaciones"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="#dimen/activity_horizontal_margin"
android:src="#drawable/ic_star" />
<LinearLayout
android:id="#+id/leftLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="#dimen/activity_horizontal_margin"
android:layout_marginBottom="10dp"
android:layout_toEndOf="#id/imgPartidasRecomendaciones"
android:orientation="vertical">
<TextView
android:id="#+id/tv_perfil_partidasJugadas"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#android:color/transparent"
android:text="Partidas"
android:textAppearance="#style/TextAppearance.AppCompat.Small"
android:textColor="#727272" />
<TextView
android:id="#+id/tv_partidasJugadasNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="#dimen/activity_horizontal_margin"
android:text="0"
android:textAlignment="center"
android:textAppearance="#style/TextAppearance.AppCompat.Medium"
android:textColor="#212121"
android:textSize="20sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/rightLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_toEndOf="#id/leftLayout"
android:layout_marginStart="60dp"
android:layout_marginBottom="10dp">
<TextView
android:id="#+id/tv_perfil_recomendaciones"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#android:color/transparent"
android:text="Recomendaciones"
android:textAppearance="#style/TextAppearance.AppCompat.Small"
android:textColor="#727272" />
<TextView
android:id="#+id/tv_recomendacionesNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="60dp"
android:text="0"
android:textAlignment="center"
android:textAppearance="#style/TextAppearance.AppCompat.Medium"
android:textColor="#212121"
android:textSize="20sp" />
</LinearLayout>
</RelativeLayout>
You can put every pair of textViews inside vertical LinearLayout but you better use constraint layout - it is a better layout for responsive screen building and easy to integrate with, here is a good example of using it:
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="#+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="#color/buttonColor"
android:text="view"
android:textColor="#color/textMainColour"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="#+id/guideline2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="19dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="#color/buttonColor"
android:text="view"
android:textColor="#color/textMainColour"
app:layout_constraintBottom_toTopOf="#+id/textView10"
app:layout_constraintEnd_toStartOf="#+id/guideline3"
app:layout_constraintStart_toStartOf="#+id/guideline2" />
<TextView
android:id="#+id/textView5"
android:layout_width="0dp"
android:layout_height="21dp"
android:layout_marginTop="8dp"
android:background="#color/buttonColor"
android:text="view"
android:textColor="#color/textMainColour"
app:layout_constraintEnd_toEndOf="#+id/textView4"
app:layout_constraintStart_toStartOf="#+id/textView4"
app:layout_constraintTop_toBottomOf="#+id/textView10" />
<TextView
android:id="#+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#color/buttonColor"
android:text="view"
android:textColor="#color/textMainColour"
app:layout_constraintBottom_toBottomOf="#+id/textView5"
app:layout_constraintEnd_toEndOf="#+id/textView8"
app:layout_constraintStart_toStartOf="#+id/textView8"
app:layout_constraintTop_toTopOf="#+id/textView5"
app:layout_constraintVertical_bias="0.0" />
<androidx.constraintlayout.widget.Guideline
android:id="#+id/guideline2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="55dp"
app:layout_constraintGuide_percent="0.2" />
<androidx.constraintlayout.widget.Guideline
android:id="#+id/guideline3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="146dp"
app:layout_constraintGuide_percent="0.6" />
<TextView
android:id="#+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:background="#color/buttonColor"
android:text="view"
android:textColor="#color/textMainColour"
app:layout_constraintBottom_toBottomOf="#+id/textView4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="#+id/textView4"
app:layout_constraintTop_toTopOf="#+id/textView4" />
</androidx.constraintlayout.widget.ConstraintLayout>
You can nest multiple layouts (LinearLayout, RelativeLayout, CoordinatorLayout) to achieve what you want.
If I understand what you asked, you are probably looking for something like this:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:padding="16dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:id="#+id/rl1"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/imgPartidasRecomendaciones"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:src="#drawable/ic_launcher_foreground" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/rl2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="#+id/rl1"
android:layout_toRightOf="#+id/rl1">
<TextView
android:id="#+id/tv_perfil_partidasJugadas"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:background="#android:color/transparent"
android:text="Partidas"
android:textAppearance="#style/TextAppearance.AppCompat.Small"
android:textColor="#727272" />
<TextView
android:id="#+id/tv_partidasJugadasNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginBottom="10dp"
android:layout_below="#id/tv_perfil_partidasJugadas"
android:layout_centerInParent="true"
android:text="0"
android:textAlignment="center"
android:textAppearance="#style/TextAppearance.AppCompat.Medium"
android:textColor="#212121"
android:textSize="20sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/rl3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="#+id/rl2"
android:layout_toRightOf="#+id/rl2">
<TextView
android:id="#+id/tv_perfil_recomendaciones"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="60dp"
android:layout_marginLeft="60dp"
android:background="#android:color/transparent"
android:text="Recomendaciones"
android:textAppearance="#style/TextAppearance.AppCompat.Small"
android:textColor="#727272" />
<TextView
android:id="#+id/tv_recomendacionesNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/tv_perfil_recomendaciones"
android:layout_alignParentBottom="true"
android:layout_marginStart="60dp"
android:layout_marginLeft="60dp"
android:layout_marginBottom="10dp"
android:text="0"
android:layout_centerInParent="true"
android:textAlignment="center"
android:textAppearance="#style/TextAppearance.AppCompat.Medium"
android:textColor="#212121"
android:textSize="20sp" />
</RelativeLayout>
</RelativeLayout>
I suggest you to use Constraint Layout to build better responsive layouts (easier).
I am working with scrollview in my xml file, but this element does not scroll. I don't know why. When I run the app, I am creating it all. It is okay, but no all textviews can be seen, but the scroll does not work for the other textviews. Here is my xml code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Activities.MostrarAnuncioEspecifico"
android:orientation="vertical"
>
<ListView
android:id="#+id/listViewAnuncioEspecifico"
android:layout_width="wrap_content"
android:layout_height="228dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:entries="#array/lisss"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</ListView>
<ScrollView
android:layout_width="match_parent"
android:layout_height="501dp"
>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<TextView
android:id="#+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="DESCRIPCION"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="#+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="ladescripcion"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="#+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="INFORMACION DEL INMUEBLE"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView12" />
<TextView
android:id="#+id/textView17"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text="Estado del inmueble:"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView14" />
<TextView
android:id="#+id/textView18"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text="Tipo de imueble:"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView17" />
<TextView
android:id="#+id/textView19"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text="Cantidad de pisos:"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView18" />
<TextView
android:id="#+id/textView20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text="Cantidad de habitaciones:"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView19" />
<TextView
android:id="#+id/textView21"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text="Cantidad de baños: "
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView20" />
<TextView
android:id="#+id/textView22"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text="Garaje:"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView21" />
<TextView
android:id="#+id/textView23"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text="Alcantarillado:"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView22" />
<TextView
android:id="#+id/textView25"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="108dp"
android:layout_marginLeft="108dp"
android:text="elestadodelinmueble"
app:layout_constraintStart_toEndOf="#+id/textView17"
app:layout_constraintTop_toTopOf="#+id/textView17" />
<TextView
android:id="#+id/textView26"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="135dp"
android:layout_marginLeft="135dp"
android:text="eltipoinmueble"
app:layout_constraintStart_toEndOf="#+id/textView18"
app:layout_constraintTop_toBottomOf="#+id/textView25" />
<TextView
android:id="#+id/textView27"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="122dp"
android:layout_marginLeft="122dp"
android:text="elcantidadpisos"
app:layout_constraintStart_toEndOf="#+id/textView19"
app:layout_constraintTop_toBottomOf="#+id/textView26" />
<TextView
android:id="#+id/textView28"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="75dp"
android:layout_marginLeft="75dp"
android:text="elcantidadhabitaciones"
app:layout_constraintStart_toEndOf="#+id/textView20"
app:layout_constraintTop_toBottomOf="#+id/textView27" />
<TextView
android:id="#+id/textView29"
android:layout_width="wrap_content"
android:layout_height="17dp"
android:layout_marginStart="114dp"
android:layout_marginLeft="114dp"
android:text="elcantidadbaño"
app:layout_constraintStart_toEndOf="#+id/textView21"
app:layout_constraintTop_toBottomOf="#+id/textView28" />
<TextView
android:id="#+id/textView30"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="195dp"
android:layout_marginLeft="195dp"
android:text="elgaraje"
app:layout_constraintStart_toEndOf="#+id/textView22"
app:layout_constraintTop_toBottomOf="#+id/textView29" />
<TextView
android:id="#+id/textView31"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="149dp"
android:layout_marginLeft="149dp"
android:text="elalcantarillado"
app:layout_constraintStart_toEndOf="#+id/textView23"
app:layout_constraintTop_toBottomOf="#+id/textView30" />
<TextView
android:id="#+id/textView32"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text="Precio:"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView23" />
<TextView
android:id="#+id/textView33"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="196dp"
android:layout_marginLeft="196dp"
android:text="elprecio"
app:layout_constraintStart_toEndOf="#+id/textView32"
app:layout_constraintTop_toBottomOf="#+id/textView31" />
<TextView
android:id="#+id/textView34"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text="Superficie:"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView32" />
<TextView
android:id="#+id/textView35"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="172dp"
android:layout_marginLeft="172dp"
android:text="lasuperficie"
app:layout_constraintStart_toEndOf="#+id/textView34"
app:layout_constraintTop_toBottomOf="#+id/textView33" />
<TextView
android:id="#+id/textView36"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text="Zona:"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView34" />
<TextView
android:id="#+id/textView37"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="203dp"
android:layout_marginLeft="203dp"
android:text="lazona"
app:layout_constraintStart_toEndOf="#+id/textView36"
app:layout_constraintTop_toBottomOf="#+id/textView35" />
<TextView
android:id="#+id/textView38"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="144dp"
android:layout_marginLeft="144dp"
android:text="eldepartamento"
app:layout_constraintStart_toEndOf="#+id/textView39"
app:layout_constraintTop_toBottomOf="#+id/textView37" />
<TextView
android:id="#+id/textView39"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="9dp"
android:layout_marginLeft="9dp"
android:text="Departamento:"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView36" />
<TextView
android:id="#+id/textView40"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="12dp"
android:text="DETALLES ADICIONALES"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView39" />
<TextView
android:id="#+id/textView41"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text="Eldetalleadicional"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView40" />
<TextView
android:id="#+id/textView42"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:text="DIRECCION"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView41" />
<TextView
android:id="#+id/textView43"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text="Ladireccion"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView42" />
<Button
android:id="#+id/button3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="VER TRUEQUE"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView43" />
<Button
android:id="#+id/button5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="VER INFORMACION DEL VENDEDOR"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/button3" />
</android.support.constraint.ConstraintLayout>
</ScrollView>
</LinearLayout>
like this is how the app works without scrolling working
If anybody want more details I can give it.
make linear layout inside scroll view and
inside linear layout put <android.support.constraint.ConstraintLayout
i am using contraint layout to align my textview in each corner of the screen but it looks like it is not working. the text on the right size of the screen gets align according to text length on the left size. take a look at the attach pic. text on the right is not properly align. for some reason there are a few spaces off. how can fix that?
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="#+id/payout_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="12dp"
android:maxLines="1"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/black"
android:text="#string/payout_label"
app:layout_constraintBottom_toTopOf="#+id/income_icon"/>
<ImageView
android:id="#+id/income_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginTop="30dp"
android:layout_marginStart="8dp"
android:layout_marginBottom="-50dp"
android:padding="1dp"
android:scaleType="centerCrop"
android:src="#drawable/ic_income"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="#+id/category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginStart="5dp"
android:layout_marginEnd="16dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/black"
android:text="Salary"
app:layout_constraintTop_toTopOf="#+id/income_icon"
app:layout_constraintStart_toEndOf="#+id/income_icon"
/>
<TextView
android:id="#+id/income_amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="$0.00"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/green"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.91"
app:layout_constraintStart_toEndOf="#+id/category"
app:layout_constraintTop_toTopOf="#+id/income_icon" />
<TextView
android:id="#+id/frequency"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="-5dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#color/grey"
android:text="Monthly"
app:layout_constraintStart_toEndOf="#+id/income_icon"
app:layout_constraintBottom_toBottomOf="#+id/income_icon" />
<TextView
android:id="#+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pending"
android:textAppearance="#style/TextAppearance.AppCompat.Body2"
android:textColor="#color/grey"
app:layout_constraintBottom_toBottomOf="#+id/income_icon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.91"
app:layout_constraintStart_toEndOf="#+id/frequency" />
</android.support.constraint.ConstraintLayout>
If you want the amount to be right-justified and aligned, you don't need the following two lines of XML:
app:layout_constraintHorizontal_bias="0.91"
app:layout_constraintStart_toEndOf="#+id/category"
So, just delete them to give the following:
<TextView
android:id="#+id/income_amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="$0.00"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/green"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="#+id/income_icon" />
If you need a margin on the right of, say, 16dp, add:
android:layout_marginEnd="16dp"
your mistakes are these - you must remove these
this line in income_amount
app:layout_constraintStart_toEndOf="#+id/category"
this line in status
app:layout_constraintStart_toEndOf="#+id/frequency"
this is correct design
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="#+id/payout_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="12dp"
android:maxLines="1"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/black"
android:text="payout_label"
app:layout_constraintBottom_toTopOf="#+id/income_icon"/>
<ImageView
android:id="#+id/income_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginTop="30dp"
android:layout_marginStart="8dp"
android:layout_marginBottom="-50dp"
android:padding="1dp"
android:scaleType="centerCrop"
android:src="#drawable/leak_canary_icon"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="#+id/category"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginStart="5dp"
android:layout_marginEnd="8dp"
android:text="Salary"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/black"
app:layout_constraintEnd_toStartOf="#+id/income_amount"
app:layout_constraintStart_toEndOf="#+id/income_icon"
app:layout_constraintTop_toTopOf="#+id/income_icon"/>
<TextView
android:id="#+id/income_amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="$0.00"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/green"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="#+id/income_icon"/>
<TextView
android:id="#+id/frequency"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="-5dp"
android:layout_marginStart="5dp"
android:layout_marginEnd="8dp"
android:text="Monthly"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#color/grey"
app:layout_constraintBottom_toBottomOf="#+id/income_icon"
app:layout_constraintEnd_toStartOf="#+id/status"
app:layout_constraintStart_toEndOf="#+id/income_icon"/>
<TextView
android:id="#+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="Pending"
android:textAppearance="#style/TextAppearance.AppCompat.Body2"
android:textColor="#color/grey"
app:layout_constraintBottom_toBottomOf="#+id/income_icon"
app:layout_constraintEnd_toEndOf="parent"/>
</android.support.constraint.ConstraintLayout>
I have aligned the status TextView to amount TextView and have given an 8 dp from right to status TextView so that it aligns to the amount TextView. Below is the code for it.
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="#+id/payout_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="12dp"
android:maxLines="1"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#android:color/black"
android:text="payout_label"
app:layout_constraintBottom_toTopOf="#+id/income_icon"/>
<ImageView
android:id="#+id/income_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginTop="30dp"
android:layout_marginStart="8dp"
android:layout_marginBottom="-50dp"
android:padding="1dp"
android:scaleType="centerCrop"
android:src="#drawable/ic_launcher_background"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintVertical_chainStyle="packed"
android:layout_marginLeft="8dp" />
<TextView
android:id="#+id/category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginStart="5dp"
android:layout_marginEnd="16dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#android:color/black"
android:text="Salary"
app:layout_constraintTop_toTopOf="#+id/income_icon"
app:layout_constraintStart_toEndOf="#+id/income_icon"
android:layout_marginLeft="5dp"
android:layout_marginRight="16dp" />
<TextView
android:id="#+id/income_amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="$0.00"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#android:color/holo_green_light"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.91"
app:layout_constraintStart_toEndOf="#+id/category"
app:layout_constraintTop_toTopOf="#+id/income_icon" />
<TextView
android:id="#+id/frequency"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="-5dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#android:color/darker_gray"
android:text="Monthly"
app:layout_constraintStart_toEndOf="#+id/income_icon"
app:layout_constraintBottom_toBottomOf="#+id/income_icon"
android:layout_marginLeft="5dp"
android:layout_marginRight="16dp" />
<TextView
android:id="#+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:text="Pending"
android:textAppearance="#style/TextAppearance.AppCompat.Body2"
android:textColor="#android:color/darker_gray"
app:layout_constraintBottom_toBottomOf="#+id/income_icon"
app:layout_constraintEnd_toEndOf="#+id/income_amount"
app:layout_constraintStart_toStartOf="#+id/income_amount" />
</android.support.constraint.ConstraintLayout>
Hope that helps!!!!
Design your layout like below.
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="#dimen/_5sdp">
<TextView
android:id="#+id/payout_date"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_5sdp"
android:maxLines="1"
android:text="payout_label"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/color_black"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="#+id/income_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginTop="#dimen/_5sdp"
android:padding="1dp"
android:scaleType="centerCrop"
android:src="#drawable/ic_inbox_active"
app:layout_constraintLeft_toLeftOf="#+id/payout_date"
app:layout_constraintTop_toBottomOf="#+id/payout_date"
tools:layout_editor_absoluteX="8dp"
tools:layout_editor_absoluteY="30dp" />
<TextView
android:id="#+id/category"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Salary"
android:layout_marginRight="#dimen/_5sdp"
android:layout_marginStart="#dimen/_5sdp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/color_black"
app:layout_constraintLeft_toRightOf="#+id/income_icon"
app:layout_constraintRight_toLeftOf="#+id/income_amount"
app:layout_constraintTop_toTopOf="#+id/income_icon"
tools:layout_editor_absoluteX="61dp"
tools:layout_editor_absoluteY="34dp" />
<TextView
android:id="#+id/income_amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="$0.00"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/color_black"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="#+id/payout_date"
tools:layout_editor_absoluteX="344dp"
tools:layout_editor_absoluteY="30dp" />
<TextView
android:id="#+id/frequency"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Monthly"
app:layout_constraintLeft_toLeftOf="#+id/category"
app:layout_constraintTop_toBottomOf="#+id/category"
app:layout_constraintRight_toLeftOf="#+id/status"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#color/color_black"
tools:layout_editor_absoluteX="61dp"
tools:layout_editor_absoluteY="59dp" />
<TextView
android:id="#+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pending"
android:textAppearance="#style/TextAppearance.AppCompat.Body2"
android:textColor="#color/color_black"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="#+id/income_amount" />
</android.support.constraint.ConstraintLayout>
I have a complicated Layout that created with constraintlayout and i need to scroll Vertically some part of it with scroll view and of Course this scroll view must include constraintlayout too,
Is any Body can help ?
I bring My code maybe it could help
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/colorPrimaryLight"
tools:context=".MainActivity"
tools:layout_editor_absoluteY="25dp">
<androidx.constraintlayout.widget.Guideline
android:id="#+id/guideLineLeft"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.02676399" />
<androidx.constraintlayout.widget.Guideline
android:id="#+id/guideLineRight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.98053527" />
<androidx.constraintlayout.widget.Guideline
android:id="#+id/guidelineTop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.019151846" />
<androidx.constraintlayout.widget.Guideline
android:id="#+id/guideLineH20to25Percent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.20519836" />
<EditText
android:id="#+id/edit_city"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="4dp"
android:background="#color/colorPrimaryLight"
android:lines="1"
android:maxLength="20"
android:maxLines="1"
android:minWidth="75dp"
android:paddingStart="4dp"
android:paddingLeft="4dp"
android:paddingTop="8dp"
android:paddingEnd="8dp"
android:paddingRight="8dp"
android:paddingBottom="8dp"
android:textAlignment="center"
android:textColor="#e1e1e1"
android:textSize="22sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="#+id/guideLineRight"
app:layout_constraintStart_toStartOf="#+id/guideLineLeft"
app:layout_constraintTop_toTopOf="#+id/guidelineTop" />
<ImageView
android:id="#+id/get_location_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="btn_clicked"
android:src="#drawable/ic_send2"
app:layout_constraintBottom_toBottomOf="#+id/edit_city"
app:layout_constraintEnd_toEndOf="#+id/edit_city"
app:layout_constraintStart_toEndOf="#+id/edit_city"
app:layout_constraintTop_toTopOf="#+id/edit_city" />
<TextView
android:id="#+id/current_weather_condition_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:minWidth="100dp"
android:textAlignment="center"
android:textColor="#color/colorText"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="#+id/edit_city"
app:layout_constraintStart_toStartOf="#+id/edit_city"
app:layout_constraintTop_toBottomOf="#+id/edit_city" />
<TextView
android:id="#+id/current_weather_temp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:textColor="#fff"
android:textSize="32sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="#+id/current_weather_condition_view"
app:layout_constraintStart_toStartOf="#+id/current_weather_condition_view"
app:layout_constraintTop_toBottomOf="#+id/current_weather_condition_view" />
<TextView
android:id="#+id/todayNameView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginTop="24dp"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="normal|bold"
app:layout_constraintStart_toStartOf="#+id/guideLineLeft"
app:layout_constraintTop_toBottomOf="#+id/guideLineH20to25Percent" />
<TextView
android:id="#+id/todayView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="Today"
android:textColor="#fff"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBaseline_toBaselineOf="#+id/todayNameView"
app:layout_constraintStart_toEndOf="#+id/todayNameView" />
<TextView
android:id="#+id/todayMinTemperature"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="40dp"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="normal|bold"
app:layout_constraintBottom_toBottomOf="#+id/todayMaxTemperature"
app:layout_constraintEnd_toStartOf="#+id/guideLineRight"
app:layout_constraintTop_toTopOf="#+id/todayMaxTemperature" />
<TextView
android:id="#+id/todayMaxTemperature"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginEnd="8dp"
android:textColor="#c5c5c5"
android:textSize="18sp"
android:textStyle="normal|bold"
app:layout_constraintEnd_toStartOf="#+id/guideLineRight"
app:layout_constraintTop_toBottomOf="#+id/guideLineH20to25Percent" />
<View
android:id="#+id/view1"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:background="#FFF"
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/todayNameView" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:scrollbars="none"
app:layout_constraintEnd_toEndOf="#+id/guideLineRight"
app:layout_constraintStart_toStartOf="#+id/guideLineLeft"
app:layout_constraintTop_toBottomOf="#+id/view1">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.Guideline
android:id="#+id/guidelineMiddleH"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5" />
<androidx.recyclerview.widget.RecyclerView
android:id="#+id/recycler_view1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginTop="4dp"
android:minHeight="100dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="#+id/view2"
android:layout_width="0dp"
android:layout_height="1dp"
android:background="#fff"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/recycler_view1" />
<ImageView
android:id="#+id/imgIcon1"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toStartOf="#+id/guidelineMiddleH"
app:layout_constraintStart_toStartOf="#+id/guidelineMiddleH"
app:layout_constraintTop_toBottomOf="#+id/view2" />
<ImageView
android:id="#+id/imgIcon2"
android:layout_width="35dp"
android:layout_height="35dp"
app:layout_constraintEnd_toEndOf="#+id/imgIcon1"
app:layout_constraintStart_toStartOf="#+id/imgIcon1"
app:layout_constraintTop_toBottomOf="#+id/imgIcon1" />
<ImageView
android:id="#+id/imgIcon3"
android:layout_width="35dp"
android:layout_height="35dp"
app:layout_constraintEnd_toEndOf="#+id/imgIcon2"
app:layout_constraintStart_toStartOf="#+id/imgIcon2"
app:layout_constraintTop_toBottomOf="#+id/imgIcon2" />
<ImageView
android:id="#+id/imgIcon4"
android:layout_width="35dp"
android:layout_height="35dp"
app:layout_constraintEnd_toEndOf="#+id/imgIcon3"
app:layout_constraintStart_toStartOf="#+id/imgIcon3"
app:layout_constraintTop_toBottomOf="#+id/imgIcon3" />
<ImageView
android:id="#+id/imgIcon5"
android:layout_width="35dp"
android:layout_height="35dp"
app:layout_constraintEnd_toEndOf="#+id/imgIcon4"
app:layout_constraintStart_toStartOf="#+id/imgIcon4"
app:layout_constraintTop_toBottomOf="#+id/imgIcon4" />
<TextView
android:id="#+id/firstDay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="normal|bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="#+id/imgIcon1" />
<TextView
android:id="#+id/secondDay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="#+id/imgIcon2"
app:layout_constraintVertical_bias="0.51" />
<TextView
android:id="#+id/thirdDay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="#+id/imgIcon3" />
<TextView
android:id="#+id/fourthDay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="#+id/imgIcon4" />
<TextView
android:id="#+id/fivthDay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="#+id/imgIcon5"/>
<TextView
android:id="#+id/maxTemp1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="40dp"
android:textAlignment="gravity"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="normal|bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="#+id/imgIcon1" />
<TextView
android:id="#+id/maxTemp2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="40dp"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="normal|bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="#+id/imgIcon2" />
<TextView
android:id="#+id/maxTemp3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="40dp"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="normal|bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="#+id/imgIcon3" />
<TextView
android:id="#+id/maxTemp4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="40dp"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="normal|bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="#+id/imgIcon4" />
<TextView
android:id="#+id/maxTemp5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="40dp"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="#+id/imgIcon5" />
<TextView
android:id="#+id/minTemp1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:textAlignment="gravity"
android:textColor="#c5c5c5"
android:textSize="18sp"
android:textStyle="normal|bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="#+id/maxTemp1" />
<TextView
android:id="#+id/minTemp2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:textColor="#c5c5c5"
android:textSize="18sp"
android:textStyle="normal|bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="#+id/maxTemp2" />
<TextView
android:id="#+id/minTemp3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:textColor="#c5c5c5"
android:textSize="18sp"
android:textStyle="normal|bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="#+id/maxTemp3" />
<TextView
android:id="#+id/minTemp4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:textColor="#c5c5c5"
android:textSize="18sp"
android:textStyle="normal|bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="#+id/maxTemp4" />
<TextView
android:id="#+id/minTemp5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:textColor="#c5c5c5"
android:textSize="18sp"
android:textStyle="normal|bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="#+id/maxTemp5" />
<View
android:id="#+id/view3"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:background="#fff"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/imgIcon5" />
<TextView
android:id="#+id/wind_name_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginTop="16dp"
android:text="Wind"
android:textColor="#color/colorPrimaryDark"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/view3" />
<TextView
android:id="#+id/currentSpeed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/wind_name_view" />
<TextView
android:id="#+id/pressure_name_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:text="PRESSURE"
android:textColor="#color/colorPrimaryDark"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="#+id/guidelineMiddleH"
app:layout_constraintTop_toBottomOf="#+id/currentFeelTemperature" />
<TextView
android:id="#+id/currentPressure"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="#+id/pressure_name_view"
app:layout_constraintTop_toBottomOf="#+id/pressure_name_view" />
<TextView
android:id="#+id/feelLike_name_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:text="FEELS LIKE"
android:textColor="#color/colorPrimaryDark"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="#+id/guidelineMiddleH"
app:layout_constraintTop_toBottomOf="#+id/view3" />
<TextView
android:id="#+id/currentFeelTemperature"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="#+id/feelLike_name_view"
app:layout_constraintTop_toBottomOf="#+id/feelLike_name_view" />
<TextView
android:id="#+id/humidity_name_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginTop="16dp"
android:text="HUMIDITY"
android:textColor="#color/colorPrimaryDark"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/currentSpeed" />
<TextView
android:id="#+id/currentHumidity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:textColor="#fff"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/humidity_name_view" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
Try adding android:fillViewport="true" to the ScrollView.
Don't forget that If you constraint some view's bottom to constraint layout's bottom.Scrollview could not scroll.
app:layout_constraintBottom_toBottomOf=“parent”
It seems that it is working, I don't know what dependency you were working with but in this one
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
Is working, this is what I did
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:id="#+id/view"
android:layout_width="377dp"
android:layout_height="2dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:background="#000000"
app:layout_constraintBottom_toTopOf="#+id/linearLayout2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.64" />
<LinearLayout
android:id="#+id/linearLayout2"
android:layout_width="176dp"
android:layout_height="268dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginBottom="40dp"
android:orientation="vertical"
app:layout_constraintBottom_toTopOf="#+id/textView17"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0">
<TextView
android:id="#+id/textView8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Account #"
android:textColor="#000000"
android:textSize="18sp" />
<!-- <TextView-->
<!-- android:id="#+id/textView9"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginTop="#dimen/lintext"-->
<!-- android:text="Company Name "-->
<!-- android:textColor="#000000"-->
<!-- android:textSize="18sp" />-->
<TextView
android:id="#+id/textView10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="#dimen/lintext"
android:text="Phone"
android:textColor="#000000"
android:textSize="18sp" />
<TextView
android:id="#+id/textView4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="#dimen/lintext"
android:text="Address"
android:textColor="#000000"
android:textSize="18sp" />
<TextView
android:id="#+id/textView5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="#dimen/lintext"
android:text="Serial number"
android:textColor="#000000"
android:textSize="18sp" />
<TextView
android:id="#+id/textView6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="#dimen/lintext"
android:text="Product name "
android:textColor="#000000"
android:textSize="18sp" />
<TextView
android:id="#+id/textView7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="#dimen/lintext"
android:text="Brand"
android:textColor="#000000"
android:textSize="18sp" />
<TextView
android:id="#+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="#dimen/lintext"
android:text="Subject"
android:textColor="#000000"
android:textSize="18sp" />
<TextView
android:id="#+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="#dimen/lintext"
android:text="Problem Details "
android:textColor="#000000"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout3"
android:layout_width="187dp"
android:layout_height="263dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="#+id/linearLayout2"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="#+id/from_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Ahmed hassen" />
<TextView
android:id="#+id/name_product"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="26 Horrya st ,helioplis 11341" />
<TextView
android:id="#+id/num_ser"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="12dp"
android:text="+201111414141" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="12dp"
android:text="CZ3351x4BW" />
<TextView
android:id="#+id/textView12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="12dp"
android:text="Hp SL230 Gen8 Rht half Svr" />
<TextView
android:id="#+id/textView14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="12dp"
android:text="Hp" />
<TextView
android:id="#+id/textView15"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="12dp"
android:text="Broken Screen" />
<TextView
android:id="#+id/textView16"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="12dp"
android:text="Broken Screen and we gonna replace it " />
</LinearLayout>
<ImageView
android:id="#+id/imageView9"
android:layout_width="377dp"
android:layout_height="70dp"
android:layout_marginTop="40dp"
android:src="#color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.328"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/editText4" />
<EditText
android:id="#+id/editText3"
android:layout_width="83dp"
android:layout_height="48dp"
android:layout_marginTop="60dp"
android:background="#drawable/style_et_border"
android:ems="10"
android:inputType="textPersonName"
android:text=" 500"
android:textColor="#FFFFFF"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.536"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/editText4" />
<TextView
android:id="#+id/textView21"
android:layout_width="134dp"
android:layout_height="32dp"
android:layout_marginEnd="12dp"
android:layout_marginRight="12dp"
android:text="Estimated Labor"
android:textColor="#FFFFFF"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="#+id/editText3"
app:layout_constraintEnd_toStartOf="#+id/editText3"
app:layout_constraintTop_toTopOf="#+id/imageView9"
app:layout_constraintVertical_bias="0.0" />
<TextView
android:id="#+id/textView22"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="EGP"
android:textColor="#FFFFFF"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="#+id/imageView9"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.196"
app:layout_constraintStart_toEndOf="#+id/editText3"
app:layout_constraintTop_toTopOf="#+id/imageView9"
app:layout_constraintVertical_bias="0.695" />
<View
android:id="#+id/ll"
android:layout_width="377dp"
android:layout_height="3dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_marginTop="15dp"
android:background="#000000"
app:layout_constraintBottom_toBottomOf="#+id/linearLayout2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/linearLayout3" />
<TextView
android:id="#+id/editText"
android:layout_width="376dp"
android:layout_height="93dp"
android:layout_marginTop="72dp"
android:layout_weight="1"
android:background="#drawable/style_et_border"
android:ems="10"
android:text="A dying or cracked display doesn't mean your laptop is a paperweight. For most laptops, a screen replacement takes"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="#+id/textView17"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.507"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/linearLayout3"
app:layout_constraintVertical_bias="0.0" />
<TextView
android:id="#+id/textView17"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginLeft="20dp"
android:layout_marginBottom="8dp"
android:text="Problem Found "
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="#+id/editText"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="#+id/textView18"
android:layout_width="219dp"
android:layout_height="29dp"
android:layout_marginTop="64dp"
android:text="Spare Parts Selected"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.074"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView19" />
<TextView
android:id="#+id/editText4"
android:layout_width="412dp"
android:layout_height="49dp"
android:layout_marginTop="8dp"
android:background="#drawable/style_et_border"
android:ems="10"
android:text=" ** Kingston Kvr16N11/8 - 8Gb Ddr3 Pc3-12800 1600Mhz Non-Ecc Cl11 Desktop Memory "
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/editText5" />
<TextView
android:id="#+id/editText5"
android:layout_width="412dp"
android:layout_height="49dp"
android:background="#drawable/style_et_border"
android:ems="10"
android:text=" ** Kingston Kvr16N11/8 - 8Gb Ddr3 Pc3-12800 1600Mhz Non-Ecc Cl11 Desktop Memory "
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView18" />
<TextView
android:id="#+id/textView19"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="36dp"
android:text="Estimated time"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.085"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/editText" />
<TextView
android:id="#+id/editText2"
android:layout_width="134dp"
android:layout_height="30dp"
android:layout_marginTop="36dp"
android:background="#drawable/style_et_border"
android:ems="10"
android:text=" 6 Hours"
android:textColor="#000000"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.224"
app:layout_constraintStart_toEndOf="#+id/textView19"
app:layout_constraintTop_toBottomOf="#+id/editText" />
<in.shadowfax.proswipebutton.ProSwipeButton
android:id="#+id/awesome_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:bg_color="#android:color/holo_blue_dark"
app:btn_text="Close Your Ticket"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/button"
app:layout_constraintVertical_bias="0.027" />
<Button
android:id="#+id/button"
android:layout_width="230dp"
android:layout_height="45dp"
android:layout_marginTop="28dp"
android:background="#drawable/style_et_border"
android:onClick="goSignature"
android:text="put your signature here"
android:textAllCaps="false"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.496"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/editText3" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
<ScrollView 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:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.constraint.ConstraintLayout
android:id="#+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.constraint.ConstraintLayout>
</ScrollView>