Hello all! I implemented image and text using RelativeLayout. Here is xml code.
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/background" android:layout_gravity="center" > <ImageView android:id="@+id/image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_centerHorizontal="true" android:src="@drawable/photo_3" android:scaleType="fitCenter" /> <TextView android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/main_title" android:layout_alignParentTop="true" android:layout_marginTop="10dip" android:layout_centerHorizontal="true" android:textSize="24.5sp" /> </RelativeLayout> When I use portrait picture emulator stops after I convert the orientation of emulator. And then I start again that application with converted state of orientaion, it works. It is so weird. :< There is no problem if I use landscape picture. Here is the message of LogCat. ERROR/dalvikvm-heap(785): 9830400-byte external allocation too large for this process ERROR/(785): VM won't let us allocate 9830400 bytes ERROR/AndroidRuntime(785): Uncaught handler: thread main exiting due to uncaught exception ERROR/AndroidRuntime(785): java.lang.RuntimeException: Unable to start activity ComponentInfo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---