Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I tested your layout in a dummy app using 20px x 20px images in place of your your images. It does not crash when I change those heights from 370dip to fill_parent.</p> <p>You really need to get the app running on either the emulator or off your phone while it's connected to Eclipse. You need to be able to see the LogCat. It will likely give you a good idea of what the cause may be.</p> <hr> <p>Edits:</p> <p>Now that you've fixed the app crashing issue, you should take a look at <a href="http://developer.android.com/resources/tutorials/views/index.html" rel="nofollow">this</a> page. It gives a number of examples of how to build a layout.</p> <p>Right now, you've got:</p> <pre><code>&lt;LinearLayout&gt; &lt;LinearLayout&gt; // Unused &lt;RelativeLayout&gt; &lt;ImageView /&gt; &lt;ImageView /&gt; &lt;/RelativeLayout&gt; &lt;/LinearLayout&gt; &lt;LinearLayout&gt; // Unused &lt;LinearLayout&gt; &lt;ImageButton /&gt; &lt;ImageButton /&gt; &lt;ImageButton /&gt; &lt;ImageButton /&gt; &lt;ImageButton /&gt; &lt;ImageButton /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>At this point, at least two of your LinearLayout blocks look to be unused. Here's a layout that does what I think you were going for:</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;RelativeLayout android:id="@+id/drag_layer" android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" android:adjustViewBounds="true" android:minHeight="100.0dip" &gt; &lt;ImageView android:id="@+id/imageViewContainer" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/backgsammi" android:scaleType="fitCenter" android:adjustViewBounds="true" /&gt; &lt;ImageView android:id="@+id/imageWatermark" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/watermark" android:layout_alignParentRight="true" /&gt; &lt;/RelativeLayout&gt; &lt;LinearLayout android:orientation="horizontal" android:id="@+id/mainLLauout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="0" &gt; &lt;ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:src="@drawable/open" /&gt; &lt;ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:src="@drawable/cat" /&gt; &lt;ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:src="@drawable/rotate" /&gt; &lt;ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:src="@drawable/eraser" /&gt; &lt;ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:src="@drawable/save" /&gt; &lt;ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:src="@drawable/help" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre>
 

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