Started learning Android 2 days ago. Below is the screenshot of my first application.
The problem is when I change the screen size the text and button below gets cropped out like in the image below.
How do I make the text adjust to the bottom always. Will that be the idle way to handle the text or should I instead make the view scrollable. Sorry if the answer to this is obvious, I am just a newbie.
Below is the code I have.
<?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=".MainActivity">
<ImageView
android:id="@+id/imageView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
app:srcCompat="@drawable/bg" />
<TextView
android:id="@+id/restaurantTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="114dp"
android:layout_marginStart="32dp"
android:layout_marginTop="497dp"
android:text="Restaurant"
android:textColor="@android:color/background_light"
android:textSize="50sp"
app:layout_constraintBottom_toTopOf="@+id/textView2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="8dp"
android:text="cheeza pizza"
android:textColor="@android:color/background_light"
android:textSize="30sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/restaurantTextView" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="8dp"
android:width="170dp"
android:background="@drawable/btn_shape_capsule"
android:drawableRight="@drawable/arrow_right"
android:padding="15dp"
android:text="START ORDER"
android:textColor="@android:color/background_light"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
</android.support.constraint.ConstraintLayout>