I have a little triangle indicating whether the user is in the registration or login screen, but there is a tiny gap between the triangle image and the RelativeLayout view it is under
That is as high as the triangle will go, and I am not sure how to raise it just 1 more pixel to get rid of that annoying gap. Here is my XML
<?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="match_parent"
android:background="#color/colorLightTan"
tools:context=".LoginActivity">
<RelativeLayout
android:id="#+id/relativeLayout2"
android:layout_width="fill_parent"
android:layout_height="58dp"
android:background="#color/colorCoral"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/relativeLayout"
app:layout_constraintVertical_bias="0.0">
<TextView
android:id="#+id/logintextBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginStart="49dp"
android:layout_marginLeft="49dp"
android:layout_weight="1"
android:font="#font/americancaptain"
android:text="Login"
android:textColor="#color/colorBackground"
android:textSize="26dp"
app:fontFamily="sans-serif-condensed" />
<TextView
android:id="#+id/logintextBar3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginStart="260dp"
android:layout_marginLeft="260dp"
android:layout_weight="1"
android:font="#font/americancaptain"
android:text="Register"
android:textColor="#color/colorBackground"
android:textSize="26dp"
app:fontFamily="sans-serif-condensed" />
<Button
android:id="#+id/registerButtonLogin"
android:layout_width="150dp"
android:layout_height="200dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginEnd="24dp"
android:layout_marginRight="24dp"
android:padding="0dp"
android:text=""
android:background="#android:color/transparent"
/>
</RelativeLayout>
<RelativeLayout
android:id="#+id/relativeLayout"
android:layout_width="fill_parent"
android:layout_height="79dp"
android:background="#color/colorBackground"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="53dp"
android:layout_marginLeft="53dp"
android:layout_marginBottom="-33dp"
android:layout_weight="1"
android:paddingBottom="0dp"
app:srcCompat="#drawable/halfhalf" />
</RelativeLayout>
<ImageView
android:id="#+id/imageView4"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="-20dp"
android:layout_marginEnd="6dp"
android:layout_marginRight="6dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.079"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/relativeLayout2"
app:srcCompat="#drawable/triangle" />
<EditText
android:id="#+id/usernameLoginBox"
android:layout_width="300dp"
android:layout_height="40dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="112dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:background="#drawable/edit_text_border"
android:ems="10"
android:hint=" Email"
android:inputType="textEmailAddress"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/imageView4"
tools:textColor="#color/colorBackground" />
<EditText
android:id="#+id/passwordLoginBox"
android:layout_width="300dp"
android:layout_height="40dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:background="#drawable/edit_text_border"
android:ems="10"
android:hint=" Password"
android:inputType="textEmailAddress"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/usernameLoginBox"
tools:textColor="#color/colorBackground" />
<Button
android:id="#+id/signinButtonLogin"
android:layout_width="300dp"
android:layout_height="64dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp"
android:background="#color/colorCoral"
android:text="LOGIN"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/passwordLoginBox" />
</android.support.constraint.ConstraintLayout>
I tried to make the marginTop -20dp to see if that would raise it at all, but it did nothing to fix the issue
Check out 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="match_parent"
android:background="#color/colorLightTan"
tools:context=".LoginActivity">
<FrameLayout
android:id="#+id/relativeLayout2"
android:layout_width="fill_parent"
android:layout_height="80dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/relativeLayout"
app:layout_constraintVertical_bias="0.0">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="58dp"
android:background="#color/colorCoral"
android:orientation="horizontal">
<TextView
android:id="#+id/logintextBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginStart="49dp"
android:layout_marginLeft="49dp"
android:layout_weight="1"
android:font="#font/americancaptain"
android:text="Login"
android:textColor="#color/colorBackground"
android:textSize="26dp"
app:fontFamily="sans-serif-condensed" />
<TextView
android:id="#+id/logintextBar3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginStart="260dp"
android:layout_marginLeft="260dp"
android:layout_weight="1"
android:font="#font/americancaptain"
android:text="Register"
android:textColor="#color/colorBackground"
android:textSize="26dp"
app:fontFamily="sans-serif-condensed" />
<Button
android:id="#+id/registerButtonLogin"
android:layout_width="150dp"
android:layout_height="200dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginEnd="24dp"
android:layout_marginRight="24dp"
android:background="#android:color/transparent"
android:padding="0dp"
android:text="" />
</RelativeLayout>
<ImageView
android:id="#+id/imageView4"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_marginTop="50dp"
android:layout_marginLeft="35dp"
app:srcCompat="#drawable/triangle" />
</FrameLayout>
<RelativeLayout
android:id="#+id/relativeLayout"
android:layout_width="fill_parent"
android:layout_height="79dp"
android:background="#color/colorBackground"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="53dp"
android:layout_marginLeft="53dp"
android:layout_marginBottom="-33dp"
android:layout_weight="1"
android:paddingBottom="0dp"
app:srcCompat="#drawable/halfhalf" />
</RelativeLayout>
<EditText
android:id="#+id/usernameLoginBox"
android:layout_width="300dp"
android:layout_height="40dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="112dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:background="#drawable/edit_text_border"
android:ems="10"
android:hint=" Email"
android:inputType="textEmailAddress"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/relativeLayout2"
tools:textColor="#color/colorBackground" />
<EditText
android:id="#+id/passwordLoginBox"
android:layout_width="300dp"
android:layout_height="40dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:background="#drawable/edit_text_border"
android:ems="10"
android:hint=" Password"
android:inputType="textEmailAddress"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/usernameLoginBox"
tools:textColor="#color/colorBackground" />
<Button
android:id="#+id/signinButtonLogin"
android:layout_width="300dp"
android:layout_height="64dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp"
android:background="#color/colorCoral"
android:text="LOGIN"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/passwordLoginBox" />
</android.support.constraint.ConstraintLayout>
Related
I have a ScrollView that wraps a ConstraintLayout, the issue is that despite the ScrollView does match completely the screen, the Constraint doesn't. I have settled both to match_parent, but the ConstraintLayout doesn't fill around a 20% on the bottom as you can see in the image, the blue line of the bottom is the max height of my ConstraintLayout , I have read many articles but haven't been able to find an answer, I don't know if this is related to data-binding. Here my code `
<data>
<variable
name="bindingViewModel"
type="com.example.workoutstopwatch.MainActivityViewModel" />
</data>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="#+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10sp"
android:layout_marginLeft="10sp"
android:layout_marginTop="10sp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:text="#string/set_your_work_out_time"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="#+id/edit_work_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="8dp"
android:layout_weight="3"
android:hint="#string/_00"
android:inputType="number"
android:maxLength="2"
android:text="#={bindingViewModel.workOutTime}"
android:textSize="80sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView3" />
<Button
android:id="#+id/up_arrow_work"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_gravity="top"
android:layout_marginStart="180dp"
android:layout_marginLeft="180dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="#drawable/arrow_left_foreground"
android:onClick="setDurationType"
android:rotation="90"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="#+id/edit_work_text"
app:layout_constraintTop_toBottomOf="#+id/textView3" />
<TextView
android:id="#+id/work_min_or_secs_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/up_arrow_work"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginTop="52dp"
android:hint="Secs"
android:text="#{bindingViewModel.workMinOrSecsText}"
android:textSize="30sp"
app:layout_constraintBottom_toBottomOf="#+id/down_arrow_work"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.739"
app:layout_constraintStart_toEndOf="#+id/edit_work_text"
app:layout_constraintTop_toBottomOf="#+id/textView3"
app:layout_constraintVertical_bias="0.0" />
<Button
android:id="#+id/down_arrow_work"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_gravity="top"
android:layout_marginStart="180dp"
android:layout_marginLeft="180dp"
android:layout_marginTop="40dp"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="#drawable/arrow_left_foreground"
android:onClick="setDurationType"
android:rotation="90"
android:rotationX="189"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.983"
app:layout_constraintStart_toEndOf="#+id/edit_work_text"
app:layout_constraintTop_toBottomOf="#+id/up_arrow_work" />
<TextView
android:id="#+id/textView4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="197dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="163dp"
android:text="#string/set_your_rest_time"
android:textSize="30sp"
app:layout_constraintBottom_toTopOf="#+id/textView5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.304"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="#+id/edit_rest_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="12dp"
android:layout_weight="3"
android:hint="#string/_00"
android:inputType="number"
android:maxLength="2"
android:text="#={bindingViewModel.restTime}"
android:textSize="80sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView4" />
<Button
android:id="#+id/up_arrow_rest"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_gravity="top"
android:layout_marginStart="180dp"
android:layout_marginLeft="180dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="#drawable/arrow_left_foreground"
android:onClick="setDurationType"
android:rotation="90"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="#+id/edit_rest_text"
app:layout_constraintTop_toBottomOf="#+id/textView4" />
<TextView
android:id="#+id/rest_min_or_secs_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/up_arrow_work"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginTop="52dp"
android:hint="Secs"
android:text="#{bindingViewModel.restMinOrSecsText}"
android:textSize="30sp"
app:layout_constraintBottom_toBottomOf="#+id/down_arrow_rest"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.739"
app:layout_constraintStart_toEndOf="#+id/edit_rest_text"
app:layout_constraintTop_toBottomOf="#+id/textView4"
app:layout_constraintVertical_bias="0.0" />
<Button
android:id="#+id/down_arrow_rest"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_gravity="top"
android:layout_marginStart="180dp"
android:layout_marginLeft="180dp"
android:layout_marginTop="40dp"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="#drawable/arrow_left_foreground"
android:onClick="setDurationType"
android:rotation="90"
android:rotationX="189"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.983"
app:layout_constraintStart_toEndOf="#+id/edit_rest_text"
app:layout_constraintTop_toBottomOf="#+id/up_arrow_rest" />
<TextView
android:id="#+id/textView5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="168dp"
android:text="#string/set_your_number_of_reps"
android:textSize="30sp"
app:layout_constraintBottom_toTopOf="#+id/start_text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.611"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView4" />
<EditText
android:id="#+id/edit_reps_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="16dp"
android:layout_weight="3"
android:hint="#string/_00"
android:inputType="number"
android:maxLength="2"
android:text="#={bindingViewModel.numberOfReps}"
android:textSize="80sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView5" />
<TextView
android:id="#+id/start_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:gravity="center"
android:onClick="startTraining"
android:text="START!"
android:textColor="#FF1800"
android:textSize="60sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
`
I'm implementing a login screen while implementing it in the Android Studio the deigning seems fine, but after building the app to emulator and mobile it seems weird, like the elements are misplaced, stretched and compressed. I'm using the drawable element in different sizes because I want this app to support multiple resolution devices.
Below image is from XML designing preview
Below image is a screenshot of emulator
Below image is from Android device
here is the xml design [link][4]
What I'm doing here wrong, any suggestions would be helpful
[4]: https://pastebin.com/d9MPen7c
The issue is you have not set the constraints properly. That is why it looks worse on the real devices.
Here is the XML code:
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/colorAccent"
android:gravity="center"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="#+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:background="#color/colorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="#+id/tv_UserName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="100dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="24dp"
android:text="User Name"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="#+id/et_UserName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="24dp"
android:backgroundTint="#FFFFFF"
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/tv_UserName" />
<TextView
android:id="#+id/tv_Password"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="24dp"
android:text="Password"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/et_UserName" />
<EditText
android:id="#+id/et_Password"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="24dp"
android:backgroundTint="#FFFFFF"
android:ems="10"
android:inputType="textPassword"
app:layout_constraintBottom_toTopOf="#id/iv_google_bt"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/tv_Password" />
<ImageView
android:id="#+id/iv_google_bt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="80dp"
android:contentDescription="#null"
android:src="#mipmap/ic_launcher"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="#id/et_Password" />
<ImageView
android:id="#+id/iv_fb_login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="80dp"
android:layout_toStartOf="#+id/iv_google_bt"
android:contentDescription="#null"
android:src="#mipmap/ic_launcher"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#id/et_Password" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="#+id/iv_getstarted_login"
android:layout_width="0dp"
android:layout_height="75dp"
android:contentDescription="#null"
android:src="#mipmap/ic_launcher"
app:layout_constraintBottom_toBottomOf="#+id/constraintLayout"
app:layout_constraintEnd_toEndOf="#+id/constraintLayout"
app:layout_constraintStart_toStartOf="#+id/constraintLayout"
app:layout_constraintTop_toBottomOf="#id/constraintLayout">
</ImageView>
<ImageView
android:id="#+id/imageView"
android:layout_width="176dp"
android:layout_height="172dp"
android:contentDescription="#null"
android:src="#mipmap/ic_launcher"
app:layout_constraintBottom_toTopOf="#+id/constraintLayout"
app:layout_constraintEnd_toEndOf="#+id/constraintLayout"
app:layout_constraintStart_toStartOf="#+id/constraintLayout"
app:layout_constraintTop_toTopOf="#+id/constraintLayout" />
<TextView
android:id="#+id/login_signup"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="#dimen/_24dp"
android:layout_marginBottom="16dp"
android:gravity="center"
android:text="Dummy text"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/iv_getstarted_login" />
<TextView
android:id="#+id/notamem"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="#dimen/_24dp"
android:layout_marginBottom="16dp"
android:gravity="center"
android:text="Dummy text"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/login_signup" />
</androidx.constraintlayout.widget.ConstraintLayout>
I have placed my resources like dimen, String and drawable. So, Please change you resources with mine.
Here is my sample code for your problem. Adjust the given static value like drawable value in this code by using your own drawable resources. Hope i help you in little way
<?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:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#EBEBEB">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<View
android:id="#+id/view"
android:layout_width="300dp"
android:layout_height="350dp"
android:layout_centerInParent="true"
android:background="#drawable/rectangle_round_view"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" >
</View>
<ImageView
android:id="#+id/img"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_above="#+id/view"
android:layout_centerInParent="true"
android:layout_centerVertical="true"
android:layout_marginBottom="-45dp"
android:background="#mipmap/ic_launcher"
app:layout_constraintBottom_toTopOf="#id/view" />
<TextView
android:id="#+id/txtUsername"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/img"
android:layout_alignStart="#+id/view"
android:layout_alignLeft="#+id/view"
android:layout_alignEnd="#+id/view"
android:layout_alignRight="#+id/view"
android:layout_marginStart="36dp"
android:layout_marginEnd="36dp"
android:layout_marginTop="70dp"
android:text="Username/Email" />
<EditText
android:id="#+id/et_UserName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/txtUsername"
android:layout_alignStart="#+id/view"
android:layout_alignLeft="#+id/view"
android:layout_alignEnd="#+id/view"
android:layout_alignRight="#+id/view"
android:layout_marginStart="36dp"
android:layout_marginEnd="36dp"
android:layout_marginTop="5dp"/>
<TextView
android:id="#+id/txtPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/et_UserName"
android:layout_alignStart="#+id/view"
android:layout_alignLeft="#+id/view"
android:layout_alignEnd="#+id/view"
android:layout_alignRight="#+id/view"
android:layout_marginStart="36dp"
android:layout_marginEnd="36dp"
android:layout_marginTop="10dp"
android:text="Password" />
<EditText
android:id="#+id/et_Password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/txtPassword"
android:layout_alignStart="#+id/view"
android:layout_alignLeft="#+id/view"
android:layout_alignEnd="#+id/view"
android:layout_alignRight="#+id/view"
android:layout_marginStart="36dp"
android:layout_marginEnd="36dp"
android:layout_marginTop="5dp"/>
<ImageButton
android:id="#+id/imgleft"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#id/view"
android:layout_alignBottom="#id/view"
android:layout_marginBottom="40dp"
android:layout_marginLeft="36dp"
android:background="#drawable/emoji"
android:layout_alignLeft="#id/view" />
<ImageButton
android:id="#+id/imgright"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="#id/view"
android:layout_alignBottom="#id/view"
android:layout_marginBottom="40dp"
android:layout_marginRight="36dp"
android:background="#drawable/emoji"
android:layout_alignRight="#id/view" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/rectangle_round"
android:layout_below="#+id/view"
android:layout_centerInParent="true"
android:layout_centerVertical="true"
android:layout_marginTop="-25dp"
android:text="Get Started"
android:textAlignment="center"
android:paddingLeft="50dp"
android:paddingRight="50dp"
android:textAllCaps="false"
app:layout_constraintBottom_toTopOf="#id/view"/>
<TextView
android:id="#+id/txtNotAMemberYet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/view"
android:layout_centerHorizontal="true"
android:layout_marginTop="87dp"
android:text="Not a member yet"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="#id/view"
app:layout_constraintBottom_toTopOf="#id/txtSignUp"
/>
<TextView
android:id="#+id/txtSignUp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/txtNotAMemberYet"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:text="Sign Up"
android:textColor="#00BCD4"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
</RelativeLayout>
This is my xml file. i am new to android development. I need to know how can i modified this layout into responsive for multiple screen sizes of the phones? I have created directories as layout-normal, layout-large, layout-xlarge. but it is not working properly. I used sp for textviews and dp for other widgets. That is also not working. Please help me to modify this xml code.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout 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/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:background="#drawable/background"
tools:context="com.respectcab.app.MainActivity"
tools:openDrawer="start"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:id="#+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="#color/design_default_color_primary"
android:elevation="4dp"
android:theme="#style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="#style/AlertDialog.AppCompat.Light" />
<android.support.constraint.ConstraintLayout
android:id="#+id/relativeLayout2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true"
tools:ignore="ExtraText"><![CDATA[
tools:context=".MainActivity">
]]>
<Button
android:id="#+id/driver"
android:layout_width="145dp"
android:layout_height="58dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp"
android:layout_toEndOf="#+id/logout"
android:layout_toRightOf="#+id/logout"
android:text="Start Trip"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="#+id/logout"
app:layout_constraintTop_toBottomOf="#+id/cus_mobile"
app:layout_constraintVertical_bias="1.0"
tools:ignore="MissingConstraints" />
<Button
android:id="#+id/logout"
android:layout_width="145dp"
android:layout_height="58dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:text="Logout"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/cus_mobile"
app:layout_constraintVertical_bias="1.0"
tools:ignore="MissingConstraints" />
<TextView
android:id="#+id/driver_id_main"
android:layout_width="91sp"
android:layout_height="55sp"
android:layout_below="#+id/driver_mobile"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginStart="33sp"
android:layout_marginLeft="33sp"
android:layout_marginTop="231sp"
android:layout_marginBottom="461sp"
android:text="TextView"
android:visibility="invisible"
app:layout_constraintBottom_toTopOf="#+id/cus_email"
app:layout_constraintEnd_toStartOf="#+id/driver_total_earn"
app:layout_constraintHorizontal_bias="0.44"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/driver_mobile"
app:layout_constraintVertical_bias="0.765"
tools:ignore="MissingConstraints" />
<TextView
android:id="#+id/driver_total_earn"
android:layout_width="65sp"
android:layout_height="44sp"
android:layout_below="#+id/driver_mobile"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginStart="65sp"
android:layout_marginLeft="65sp"
android:layout_marginBottom="461sp"
android:layout_toEndOf="#+id/driver_id_main"
android:layout_toRightOf="#+id/driver_id_main"
android:text="TextView"
android:visibility="invisible"
app:layout_constraintBottom_toTopOf="#+id/cus_email"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="MissingConstraints" />
<EditText
android:id="#+id/cus_mobile"
android:layout_width="398dp"
android:layout_height="53dp"
android:layout_below="#+id/cus_email"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:hint="Customer Mobile No"
android:text=""
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/cus_email"
tools:ignore="MissingConstraints" />
<EditText
android:id="#+id/cus_email"
android:layout_width="404dp"
android:layout_height="69dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="108dp"
android:hint="Customer Email"
android:text=""
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/spinner_package"
tools:ignore="MissingConstraints" />
<ImageView
android:id="#+id/imageView3"
android:layout_width="128dp"
android:layout_height="91dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginStart="115dp"
android:layout_marginLeft="115dp"
android:layout_marginEnd="130dp"
android:layout_marginRight="130dp"
android:src="#mipmap/ic_user_profile"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.407"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/textView1"
tools:srcCompat="#tools:sample/avatars" />
<TextView
android:id="#+id/driver_name"
android:layout_width="312sp"
android:layout_height="50sp"
android:layout_below="#+id/imageView3"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:gravity="center_horizontal"
android:text="TextView"
android:textSize="30sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/imageView3"
tools:ignore="MissingConstraints" />
<TextView
android:id="#+id/driver_mobile"
android:layout_width="177sp"
android:layout_height="33sp"
android:layout_below="#+id/driver_name"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginStart="124sp"
android:layout_marginLeft="124sp"
android:layout_marginTop="12sp"
android:layout_marginEnd="147sp"
android:layout_marginRight="147sp"
android:gravity="center_horizontal"
android:text="TextView"
android:textSize="15sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.492"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/driver_name" />
<Switch
android:id="#+id/switch1"
android:layout_width="43dp"
android:layout_height="22dp"
android:layout_below="#+id/driver_mobile"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:scaleX="2.5"
android:scaleY="2.5"
android:textOff="Turn On"
android:textOn="Turn Off"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.472"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/driver_mobile"
tools:ignore="MissingConstraints" />
<Button
android:id="#+id/button1"
android:layout_width="68dp"
android:layout_height="42dp"
android:layout_alignTop="#+id/textView1"
android:layout_centerHorizontal="true"
android:text="Click Here to Enable Disable GPS location service!"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.958"
app:layout_constraintStart_toEndOf="#+id/textView1"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints" />
<TextView
android:id="#+id/textView1"
android:layout_width="248sp"
android:layout_height="37sp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="location service Stauts Shows Here"
android:textAppearance="?android:attr/textAppearanceLarge"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints" />
<android.support.design.widget.FloatingActionButton
android:id="#+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="#dimen/fab_margin"
tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="326dp"
tools:layout_editor_absoluteY="142dp"
android:visibility="invisible"/>
<!--<android.support.v7.widget.RecyclerView-->
<!--android:id="#+id/vehicle_list_name"-->
<!--android:layout_width="636dp"-->
<!--android:layout_height="218dp"-->
<!--android:layout_alignParentStart="true"-->
<!--android:layout_alignParentLeft="true"-->
<!--android:layout_alignParentEnd="true"-->
<!--android:layout_alignParentRight="true"-->
<!--android:layout_alignParentBottom="true"-->
<!--tools:ignore="MissingConstraints"-->
<!--tools:layout_editor_absoluteX="-35dp"-->
<!--tools:layout_editor_absoluteY="26dp"-->
<!--tools:listitem="#layout/recycler_view_item" />-->
<Spinner
android:id="#+id/spinner_package"
android:layout_width="307dp"
android:layout_height="13dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.636"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/switch1" />
</android.support.constraint.ConstraintLayout>
</LinearLayout>
<android.support.design.widget.NavigationView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:id="#+id/nav_view"
app:headerLayout="#layout/nav_header_main2"
app:menu="#menu/drawer_menu">
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
use this library for layout so all size screen might be cover with one layout:) - implementation 'com.intuit.sdp:sdp-android:1.0.6'
link
I'm using my Android phone (Xiaomi A2 Lite, 5.84 inches, 1080 x 2280, which is even bigger than Nexus 5) for app development. I have landscape layouts for every layout I have, and I used ConstraintLayouts for all of the elements inside.
However when testing landscape mode on my phone, the texts and images are not displayed as correctly as in Android Studio :(
Are there any solutions for this? Can I add my own resolutions / devices into the device list?
This is how it should look
This is how it displays
Code of the XML landscape file
<?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="match_parent"
tools:context="com.example.ducnguyen.miniexplorer.MainMenu">
<TextView
android:id="#+id/textView11"
android:layout_width="150dp"
android:layout_height="42dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="#string/main_menu_title"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.501"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="#string/main_menu_title" />
<ImageView
android:id="#+id/imageView3"
android:layout_width="94dp"
android:layout_height="93dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:onClick="gotoReadingScreen"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="#+id/imageView4"
app:layout_constraintHorizontal_bias="0.455"
app:layout_constraintStart_toEndOf="#+id/imageView5"
app:layout_constraintTop_toBottomOf="#+id/textView11"
app:layout_constraintVertical_bias="0.092"
app:srcCompat="#drawable/forest" />
<ImageView
android:id="#+id/imageView4"
android:layout_width="97dp"
android:layout_height="90dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="48dp"
android:layout_marginBottom="8dp"
android:onClick="gotoExplorerScreen"
app:layout_constraintBottom_toTopOf="#+id/textView13"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.756"
app:srcCompat="#drawable/car" />
<ImageView
android:id="#+id/imageView5"
android:layout_width="96dp"
android:layout_height="76dp"
android:layout_marginStart="68dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="192dp"
android:onClick="gotoSettingScreen"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="#+id/imageView4"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0"
app:srcCompat="#drawable/settings" />
<ImageView
android:id="#+id/imageView10"
android:layout_width="58dp"
android:layout_height="65dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="56dp"
android:layout_marginBottom="56dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.551"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="#drawable/phonecall" />
<ImageView
android:id="#+id/imageView12"
android:onClick="LogOut"
android:layout_width="47dp"
android:layout_height="101dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="48dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.879"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0"
app:srcCompat="#drawable/logout" />
<TextView
android:id="#+id/textView12"
android:layout_width="152dp"
android:layout_height="27dp"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:onClick="gotoReadingScreen"
android:text="#string/menu_reading"
app:layout_constraintBottom_toTopOf="#+id/imageView10"
app:layout_constraintEnd_toStartOf="#+id/textView13"
app:layout_constraintStart_toEndOf="#+id/textView14"
app:layout_constraintTop_toBottomOf="#+id/imageView3"
app:layout_constraintVertical_bias="1.0" />
<TextView
android:id="#+id/textView13"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginStart="8dp"
android:layout_marginTop="184dp"
android:layout_marginEnd="8dp"
android:onClick="gotoExplorerScreen"
android:text="#string/menu_explorer_status"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.891"
app:layout_constraintStart_toEndOf="#+id/textView14"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="#+id/textView14"
android:layout_width="66dp"
android:layout_height="35dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:onClick="gotoSettingScreen"
android:text="#string/menu_settings"
android:textSize="15sp"
app:layout_constraintBottom_toTopOf="#+id/imageView11"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.147"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/imageView5"
app:layout_constraintVertical_bias="1.0" />
<TextView
android:id="#+id/textView15"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:text="#string/menu_live_support"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.501"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/imageView10"
app:layout_constraintVertical_bias="0.0" />
<TextView
android:id="#+id/textView16"
android:layout_width="wrap_content"
android:layout_height="23dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:onClick="gotoAboutUsScreen"
android:text="#string/menu_about_us"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="#+id/textView15"
app:layout_constraintHorizontal_bias="0.454"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/imageView11"
app:layout_constraintVertical_bias="0.333" />
<TextView
android:id="#+id/textView17"
android:layout_width="69dp"
android:layout_height="24dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:onClick="gotoLoginScreen"
android:text="#string/logout"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.709"
app:layout_constraintStart_toEndOf="#+id/textView15"
app:layout_constraintTop_toBottomOf="#+id/imageView12"
app:layout_constraintVertical_bias="0.0" />
<ImageView
android:id="#+id/imageView11"
android:layout_width="61dp"
android:layout_height="65dp"
android:layout_marginStart="8dp"
android:layout_marginTop="76dp"
android:layout_marginEnd="8dp"
android:onClick="gotoAboutUsScreen"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.155"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/imageView5"
app:srcCompat="#drawable/question" />
</android.support.constraint.ConstraintLayout>
try this sample layout. It works in Mi A2 device
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".MainActivity"
android:background="#212c3d">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="#+id/textView11"
android:layout_width="150dp"
android:layout_height="42dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="Main Menu"
android:textSize="30sp"
android:textColor="#FFF"
android:layout_margin="10dp"
android:layout_gravity="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="3"
android:layout_margin="10dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.551"
app:layout_constraintStart_toStartOf="parent">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="#drawable/icon_setting" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Settings"
android:textColor="#FFF" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:layout_weight="1">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="#drawable/icon_setting"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Settings"
android:textColor="#FFF"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:layout_weight="1">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="#drawable/icon_setting"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Settings"
android:textColor="#FFF"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="3"
android:layout_margin="10dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="#drawable/icon_setting" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Settings"
android:textColor="#FFF" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:layout_weight="1">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="#drawable/icon_setting"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Settings"
android:textColor="#FFF"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:layout_weight="1">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="#drawable/icon_setting"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Settings"
android:textColor="#FFF"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
Sample Screenshot
I'm trying to make a layout divided into two parts in which the lower part should be scrollable.But the scrollview wont scroll completely till the end.
I have tried using NestedScrollView.I have also already tried adding margins and padding to scrollview, constraint layout, last view in the scroll view.Button at the end is not reachable. view abruptly ends in the middle of the textview above that button.
<?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"
tools:context=".mainClusterActivity"
android:id="#+id/const1"
android:layout_height="match_parent"
android:layout_width="match_parent">
<RelativeLayout
android:id="#+id/relativeLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:gravity="center"
app:layout_constraintTop_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
>
<TextView
android:id="#+id/tv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="Seen" />
<android.support.v7.widget.AppCompatCheckBox
android:clickable="false"
android:id="#+id/searchedCheckBoxId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/tv1" />
<TextView
android:id="#+id/tv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/searchedCheckBoxId"
android:text="Learnt" />
<android.support.v7.widget.AppCompatCheckBox
android:id="#+id/learnedCheckBoxId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/tv2" />
<TextView
android:id="#+id/tv3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/learnedCheckBoxId"
android:text="Mark" />
<android.support.v7.widget.AppCompatCheckBox
android:id="#+id/markedCheckBoxId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/tv3" />
</RelativeLayout>
<TextView
android:id="#+id/wordTvId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="20dp"
android:text="WORD!"
android:textSize="80sp"
app:layout_constraintTop_toBottomOf="#+id/relativeLayout2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
/>
<TextView
android:id="#+id/tempBarTv"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#android:color/black"
app:layout_constraintTop_toBottomOf="#+id/wordTvId"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="#+id/tempBarTv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp">
<TextView
android:id="#+id/meaningTempId"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="10dp"
android:text="Meaning"
android:textAlignment="center"
android:textColor="#android:color/background_light"
android:textSize="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="parent" />
<ListView
android:id="#+id/meaningLvId"
android:layout_width="350dp"
android:layout_height="200dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="10dp"
android:background="#drawable/round_rect_shape"
android:scrollbars="vertical"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.488"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/meaningTempId" />
<TextView
android:id="#+id/temp2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:text="Synonyms"
android:textAlignment="center"
android:textColor="#android:color/background_light"
android:textSize="20sp"
app:layout_constraintTop_toBottomOf="#+id/meaningLvId"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.069"
app:layout_constraintStart_toStartOf="parent" />
<ListView
android:id="#+id/SynonymsLvId"
android:layout_width="350dp"
android:layout_height="250dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="48dp"
android:background="#drawable/round_rect_shape"
android:scrollbars="vertical"
android:text="Meaning"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/temp2" />
<TextView
android:id="#+id/temp1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:text="Synonyms with Seached Words"
android:textAlignment="center"
android:textColor="#android:color/background_light"
android:textSize="20sp"
app:layout_constraintTop_toBottomOf="#+id/SynonymsLvId"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.069"
app:layout_constraintStart_toStartOf="parent" />
<ListView
android:id="#+id/SynonymsWithSearchedLvId"
android:layout_width="350dp"
android:layout_height="200dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="48dp"
android:background="#drawable/round_rect_shape"
android:scrollbars="vertical"
android:text="Meaning"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/temp1" />
<TextView
android:id="#+id/notesTempTvId"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="15dp"
android:text="Notes"
android:textAlignment="center"
android:textColor="#android:color/background_light"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/SynonymsWithSearchedLvId" />
<TextView
android:id="#+id/notesTvId"
android:layout_width="350dp"
android:layout_height="150dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="10dp"
android:background="#drawable/round_rect_shape"
android:text="Notes"
android:textAlignment="center"
android:textColor="#android:color/background_light"
android:textSize="23sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/notesTempTvId" />
<Button
android:id="#+id/addNotesId"
android:layout_width="350dp"
android:layout_height="50dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="15dp"
android:background="#drawable/red_rounded_rect"
android:text="EDIT NOTES!"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/notesTvId"
/>
</android.support.constraint.ConstraintLayout>
</ScrollView>
</android.support.constraint.ConstraintLayout>
EDIT: I changed the parent constraint layout to relative layout and it works perfectly fine now. Still no idea why it didn't before. Thanks for the response.
<!--I have commented where you have to change and why. do all mention changes. it will work fine-->
<?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"
android:id="#+id/const1"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="#+id/relativeLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:gravity="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="parent">
<TextView
android:id="#+id/tv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="Seen" />
<android.support.v7.widget.AppCompatCheckBox
android:id="#+id/searchedCheckBoxId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/tv1"
android:clickable="false" />
<TextView
android:id="#+id/tv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/searchedCheckBoxId"
android:text="Learnt" />
<android.support.v7.widget.AppCompatCheckBox
android:id="#+id/learnedCheckBoxId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/tv2" />
<TextView
android:id="#+id/tv3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/learnedCheckBoxId"
android:text="Mark" />
<android.support.v7.widget.AppCompatCheckBox
android:id="#+id/markedCheckBoxId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#+id/tv3" />
</RelativeLayout>
<TextView
android:id="#+id/wordTvId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginStart="8dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="8dp"
android:text="WORD!"
android:textSize="80sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/relativeLayout2" />
<TextView
android:id="#+id/tempBarTv"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#android:color/black"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/wordTvId" />
<!-- Add app:layout_constraintBottom_toBottomOf="parent"
And also set width and Height to 0dp so scrollView will take rest screen height.-->
<ScrollView
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/tempBarTv">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp">
<TextView
android:id="#+id/meaningTempId"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="12dp"
android:text="Meaning"
android:textAlignment="center"
android:textColor="#android:color/background_light"
android:textSize="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="parent" />
<ListView
android:id="#+id/meaningLvId"
android:layout_width="350dp"
android:layout_height="200dp"
android:layout_marginStart="8dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="8dp"
android:background="#drawable/round_rect_shape"
android:scrollbars="vertical"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.488"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/meaningTempId" />
<!--This textView is having wrong id if you have not defined into resource. There is + sign is missing or define id into resource-->
<TextView
android:id="#+id/temp2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:text="Synonyms"
android:textAlignment="center"
android:textColor="#android:color/background_light"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.069"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/meaningLvId" />
<ListView
android:id="#+id/SynonymsLvId"
android:layout_width="350dp"
android:layout_height="250dp"
android:layout_marginStart="8dp"
android:layout_marginTop="48dp"
android:layout_marginEnd="8dp"
android:background="#drawable/round_rect_shape"
android:scrollbars="vertical"
android:text="Meaning"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/temp2" />
<TextView
android:id="#+id/temp1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:text="Synonyms with Seached Words"
android:textAlignment="center"
android:textColor="#android:color/background_light"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.069"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/SynonymsLvId" />
<ListView
android:id="#+id/SynonymsWithSearchedLvId"
android:layout_width="350dp"
android:layout_height="200dp"
android:layout_marginStart="8dp"
android:layout_marginTop="48dp"
android:layout_marginEnd="8dp"
android:background="#drawable/round_rect_shape"
android:scrollbars="vertical"
android:text="Meaning"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/temp1" />
<TextView
android:id="#+id/notesTempTvId"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:text="Notes"
android:textAlignment="center"
android:textColor="#android:color/background_light"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/SynonymsWithSearchedLvId" />
<TextView
android:id="#+id/notesTvId"
android:layout_width="350dp"
android:layout_height="150dp"
android:layout_marginStart="8dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="8dp"
android:background="#drawable/round_rect_shape"
android:text="Notes"
android:textAlignment="center"
android:textColor="#android:color/background_light"
android:textSize="23sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/notesTempTvId" />
<Button
android:id="#+id/addNotesId"
android:layout_width="350dp"
android:layout_height="50dp"
android:layout_marginStart="8dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="8dp"
android:background="#drawable/red_rounded_rect"
android:text="EDIT NOTES!"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/notesTvId" />
</android.support.constraint.ConstraintLayout>
</ScrollView>
</android.support.constraint.ConstraintLayout>