-1

I have to change my app launcher layout. So I made one with Linearlayout with background image. There is no errors in Android Studio when building, but when i try to start it it crashes.

Here is my layout XML:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background= "@drawable/newgame"
android:baselineAligned="false">

<ImageView
    android:layout_width="293dp"
    android:layout_height="214dp"
    android:id="@+id/imageButton"
    android:layout_gravity="center_vertical"
    android:src="@drawable/apple"
    android:scaleType="fitCenter"
    android:adjustViewBounds="true"
    android:layout_marginLeft="50dp"
    android:clickable="true" />


</LinearLayout>

I even deleted the ImageView with no help. Is there something fundamentally wrong in using Linearlayout? My old layout (and others I have tried works just fine) Thanks for the help!

LaBSo
  • 1
  • 2

1 Answers1

0

The problem seems to be in my emulator at the moment. Deleting the background image in the layout solved the problem. I also increased the memory heap size. Thanks for help!

LaBSo
  • 1
  • 2