Error creating multiple buttons in XML (Android Studio)

0

I'm creating an Android application that needs to have 20 buttons and each button will open a different screen. The application compiles correctly, but when I get to the screen that has the 20 buttons it automatically closes, I realized that if I put a few buttons, the screen opens normal, but I need to put the 20 buttons. What can be happening? Please help me.

'

<Button
    android:id="@+id/bA"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/ima"
    android:layout_alignParentTop="true"
    android:layout_alignParentStart="true"
    android:layout_marginStart="12dp" />
<Button
    android:id="@+id/bB"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imb"
    android:layout_alignParentTop="true"
    android:layout_toEndOf="@+id/bA"
    android:layout_marginStart="9dp" />
<Button
    android:id="@+id/bC"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imc"
    android:layout_alignParentTop="true"
    android:layout_toEndOf="@+id/bB"
    android:layout_marginStart="10dp" />
<Button
    android:id="@+id/bD"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imd"
    android:layout_alignParentTop="true"
    android:layout_toEndOf="@+id/bC"
    android:layout_marginStart="12dp" />

<Button
    android:id="@+id/bE"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/ime"
    android:layout_alignParentTop="true"
    android:layout_toEndOf="@+id/bD"
    android:layout_marginStart="15dp" />

<Button
    android:id="@+id/bF"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imf"
    android:layout_alignParentTop="true"
    android:layout_toEndOf="@+id/bE"
    android:layout_marginStart="13dp" />

<Button
    android:id="@+id/bG"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/img"
    android:layout_alignParentTop="true"
    android:layout_toEndOf="@+id/bF"
    android:layout_marginStart="17dp" />

<Button
    android:id="@+id/bH"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imh"
    android:layout_alignParentTop="true"
    android:layout_alignParentEnd="true"
    android:layout_marginEnd="8dp" />

<Button
    android:id="@+id/bI"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imi"
    android:layout_marginTop="13dp"
    android:layout_below="@+id/bA"
    android:layout_alignStart="@+id/bA" />

<Button
    android:id="@+id/bJ"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imj"
    android:layout_marginTop="0dp"
    android:layout_alignTop="@+id/bI"
    android:layout_alignStart="@+id/bB" />

<Button
    android:id="@+id/bK"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imk"
    android:layout_marginTop="0dp"
    android:layout_alignBottom="@+id/bJ"
    android:layout_alignStart="@+id/bC" />

<Button
    android:id="@+id/bL"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/iml"
    android:layout_marginTop="0dp"
    android:layout_alignBottom="@+id/bK"
    android:layout_alignStart="@+id/bD" />

<Button
    android:id="@+id/bM"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imm"
    android:layout_alignBottom="@+id/bL"
    android:layout_alignStart="@+id/bE"
    android:layout_marginTop="0dp"
    />

<Button
    android:id="@+id/bN"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imn"
    android:layout_marginTop="0dp"
    android:layout_alignBottom="@+id/bM"
    android:layout_alignStart="@+id/bF" />

<Button
    android:id="@+id/bO"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imo"
    android:layout_marginTop="0dp"
    android:layout_alignBottom="@+id/bN"
    android:layout_alignStart="@+id/bG" />

<Button
    android:id="@+id/bP"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imp"
    android:layout_marginTop="0dp"
    android:layout_alignBottom="@+id/bO"
    android:layout_alignStart="@+id/bH" />

<Button
    android:id="@+id/bQ"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imq"
    android:layout_marginTop="0dp"
    android:layout_alignBottom="@+id/bO"
    android:layout_alignStart="@+id/bH"
    />

<Button
    android:id="@+id/bR"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imr"
    android:layout_marginTop="8dp"
    android:layout_below="@+id/bI"
    android:layout_alignStart="@+id/bI" />

<Button
    android:id="@+id/bS"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/ims"
    android:layout_marginTop="0dp"
    android:layout_alignBottom="@+id/bR"
    android:layout_alignStart="@+id/bJ" />

<Button
    android:id="@+id/bT"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imt"
    android:layout_marginTop="0dp"
    android:layout_alignBottom="@+id/bS"
    android:layout_alignStart="@+id/bK" />

<Button
    android:id="@+id/bU"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imu"
    android:layout_marginTop="0dp"
    android:layout_alignBottom="@+id/bT"
    android:layout_alignStart="@+id/bL" />

<Button
    android:id="@+id/bV"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imv"
    android:layout_marginTop="0dp"
    android:layout_alignBottom="@+id/bU"
    android:layout_alignStart="@+id/bM" />

<Button
    android:id="@+id/bW"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imw"
    android:layout_marginTop="0dp"
    android:layout_alignBottom="@+id/bV"
    android:layout_alignStart="@+id/bN" />

<Button
    android:id="@+id/bX"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imx"
    android:layout_marginTop="0dp"
    android:layout_alignBottom="@+id/bW"
    android:layout_alignStart="@+id/bO" />

<Button
    android:id="@+id/bY"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imy"
    android:layout_marginTop="0dp"
    android:layout_alignBottom="@+id/bX"
    android:layout_alignStart="@+id/bP" />

<Button
    android:id="@+id/bZ"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:background="@drawable/imz"
    android:layout_marginEnd="35dp"
    android:layout_alignParentBottom="true"
    android:layout_alignEnd="@+id/bY"
    android:layout_marginBottom="12dp" />





<pl.droidsonroids.gif.GifImageView
    android:id="@+id/play_"
    android:layout_width="80dp"
    android:layout_height="70dp"
    android:layout_marginLeft="11dp"
    android:background="@null"
    android:src="@drawable/play1"
    android:layout_alignParentBottom="true"
    android:layout_toStartOf="@+id/bS" />

'

    
asked by anonymous 10.08.2017 / 05:30

0 answers