0

I am working in Android Studio and trying to draw a few images. However, the app stops running after I put the fifth image. When I take away the fifth image the program works just fine. I do not have any java code set to do anything so this is the only place where the problem could be. Here is the 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"
tools:context=".GreateActivity">

<TextView
    android:id="@+id/textView6"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginEnd="8dp"
    android:layout_marginStart="8dp"
    android:layout_marginTop="8dp"
    android:fontFamily="@font/architects_daughter"
    android:text="@string/greateAt"
    android:textSize="36sp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

<TextView
    android:id="@+id/textView7"
    android:layout_width="0dp"
    android:layout_height="180dp"
    android:layout_marginEnd="8dp"
    android:layout_marginStart="8dp"
    android:layout_marginTop="40dp"
    android:fontFamily="@font/architects_daughter"
    android:text="@string/greatTxt"
    android:textSize="24sp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/textView6" />

<ImageView
    android:id="@+id/imageView7"
    android:layout_width="100dp"
    android:layout_height="100dp"
    android:layout_marginStart="8dp"
    android:layout_marginTop="8dp"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/textView7"
    app:srcCompat="@drawable/html" />

<ImageView
    android:id="@+id/imageView8"
    android:layout_width="100dp"
    android:layout_height="100dp"
    android:layout_marginEnd="8dp"
    android:layout_marginStart="8dp"
    android:layout_marginTop="8dp"
    app:layout_constraintEnd_toStartOf="@+id/imageView13"
    app:layout_constraintStart_toEndOf="@+id/imageView7"
    app:layout_constraintTop_toBottomOf="@+id/textView7"
    app:srcCompat="@drawable/css" />

<ImageView
    android:id="@+id/imageView9"
    android:layout_width="100dp"
    android:layout_height="100dp"
    android:layout_marginBottom="8dp"
    android:layout_marginStart="8dp"
    android:layout_marginTop="8dp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toStartOf="@+id/imageView15"
    app:layout_constraintHorizontal_bias="0.5"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/imageView8"
    app:srcCompat="@drawable/java" />

<ImageView
    android:id="@+id/imageView13"
    android:layout_width="100dp"
    android:layout_height="100dp"
    android:layout_marginEnd="8dp"
    android:layout_marginTop="8dp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/textView7"
    app:srcCompat="@drawable/js" />

<ImageView
    android:id="@+id/imageView15"
    android:layout_width="100dp"
    android:layout_height="100dp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintHorizontal_bias="0.5"
    app:layout_constraintStart_toEndOf="@+id/imageView9"
    app:srcCompat="@drawable/python"
    tools:layout_editor_absoluteY="402dp" />

</android.support.constraint.ConstraintLayout>

How do I fix this issue?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
M.A.Williams
  • 223
  • 1
  • 9
  • 1
    What does the error log say? Post it here. – Suleyman May 05 '18 at 20:23
  • Do you mean the images are not correctly displayed when you put the fifth image? If that is the case try putting your layout into a ScrollView. Refer [this](https://stackoverflow.com/questions/6674341/how-to-use-scrollview-in-android) – Abhishek Wadhawan May 05 '18 at 20:28

0 Answers0