Note that there are some explanatory texts on larger screens.

plurals
  1. POfix layout imageview and scrollable textview
    primarykey
    data
    text
    <p>I need have a layout with fixed image and a textview scrollable. The problem is: if the text increase, imageview become smaller and vice-versa. I'd like fix size of image.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:background="#000" android:src="@drawable/luna" /&gt; &lt;ScrollView android:id="@+id/scrollView1" android:layout_width="fill_parent" android:layout_height="wrap_content" &gt; &lt;TextView android:text="test test test test" android:textSize="15pt" android:background="#000000" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1"/&gt; &lt;/ScrollView&gt; &lt;/LinearLayout&gt; E/AndroidRuntime( 729): FATAL EXCEPTION: main E/AndroidRuntime( 729): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.luna/com.example.luna.MainActivity}: android.view.InflateException: Binary XML file line #8: Error inflating class &lt;unknown&gt; E/AndroidRuntime( 729): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059) E/AndroidRuntime( 729): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) E/AndroidRuntime( 729): at android.app.ActivityThread.access$600(ActivityThread.java:130) E/AndroidRuntime( 729): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) E/AndroidRuntime( 729): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 729): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime( 729): at android.app.ActivityThread.main(ActivityThread.java:4745) E/AndroidRuntime( 729): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 729): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime( 729): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) E/AndroidRuntime( 729): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) E/AndroidRuntime( 729): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 729): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class &lt;unknown&gt; E/AndroidRuntime( 729): at android.view.LayoutInflater.createView(LayoutInflater.java:613) E/AndroidRuntime( 729): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) E/AndroidRuntime( 729): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660) E/AndroidRuntime( 729): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685) E/AndroidRuntime( 729): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) E/AndroidRuntime( 729): at android.view.LayoutInflater.inflate(LayoutInflater.java:489) E/AndroidRuntime( 729): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) E/AndroidRuntime( 729): at android.view.LayoutInflater.inflate(LayoutInflater.java:352) E/AndroidRuntime( 729): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256) E/AndroidRuntime( 729): at android.app.Activity.setContentView(Activity.java:1867) E/AndroidRuntime( 729): at com.example.luna.MainActivity.onCreate(MainActivity.java:21) E/AndroidRuntime( 729): at android.app.Activity.performCreate(Activity.java:5008) E/AndroidRuntime( 729): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079) E/AndroidRuntime( 729): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023) E/AndroidRuntime( 729): ... 11 more E/AndroidRuntime( 729): Caused by: java.lang.reflect.InvocationTargetException E/AndroidRuntime( 729): at java.lang.reflect.Constructor.constructNative(Native Method) E/AndroidRuntime( 729): at java.lang.reflect.Constructor.newInstance(Constructor.java:417) E/AndroidRuntime( 729): at android.view.LayoutInflater.createView(LayoutInflater.java:587) E/AndroidRuntime( 729): ... 24 more E/AndroidRuntime( 729): Caused by: java.lang.OutOfMemoryError E/AndroidRuntime( 729): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) E/AndroidRuntime( 729): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:500) E/AndroidRuntime( 729): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:353) E/AndroidRuntime( 729): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:781) E/AndroidRuntime( 729): at android.content.res.Resources.loadDrawable(Resources.java:1930) E/AndroidRuntime( 729): at android.content.res.TypedArray.getDrawable(TypedArray.java:601) E/AndroidRuntime( 729): at android.widget.ImageView.&lt;init&gt;(ImageView.java:120) E/AndroidRuntime( 729): at android.widget.ImageView.&lt;init&gt;(ImageView.java:110) E/AndroidRuntime( 729): ... 27 more W/ActivityManager( 150): Force finishing activity com.example.luna/.MainActivity W/WindowManager( 150): Failure taking screenshot for (164x246) to layer 21010 I/Choreographer( 150): Skipped 104 frames! The application may be doing too much work on its main thread. W/ActivityManager( 150): Activity pause timeout for ActivityRecord{412421f0 com.example.luna/.MainActivity} I/Choreographer( 150): Skipped 31 frames! The application may be doing too much work on its main thread. I/Choreographer( 262): Skipped 79 frames! The application may be doing too much work on its main thread. I/Choreographer( 150): Skipped 43 frames! The application may be doing too much work on its main thread. I/Choreographer( 150): Skipped 31 frames! The application may be doing too much work on its main thread. I/Choreographer( 150): Skipped 35 frames! The application may be doing too much work on its main thread. I/ActivityManager( 150): No longer want com.android.contacts (pid 371): hidden #16 W/ActivityManager( 150): Activity destroy timeout for ActivityRecord{412421f0 com.example.luna/.MainActivity} </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload