Note that there are some explanatory texts on larger screens.

plurals
  1. POTwo Relative Layouts on the one screen
    primarykey
    data
    text
    <p>i want to have 2 Relative Layouts on my screen. One below another. I made this code but it doesn't work. In this case i can see only upper Relative Layout insted of both and this layout take whole space although i set wrap_content.</p> <p>EDIT!: I put below the second code which fails too.</p> <p>EDIT 2!: I found problem... That's a bit... sad. Problem lie in my theme. I set background to png file which was too big and when i applied default theme via manifest then this happend. When i removed it all is good.</p> <p>This version fails too.</p> <p>New code:</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" &gt; &lt;RelativeLayout android:id="@+id/some_id" android:layout_above="@+id/some_id2" android:layout_alignParentTop="true" android:layout_width="wrap_content" android:layout_height="wrap_content" &gt; &lt;Button android:id="@+id/main_button_localize" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/main_localize" /&gt; &lt;/RelativeLayout&gt; &lt;RelativeLayout android:id="@id/some_id2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" &gt; &lt;ToggleButton android:id="@+id/main_help" android:layout_width="wrap_content" android:layout_height="wrap_content" /&gt; &lt;/RelativeLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Old code:</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" &gt; &lt;RelativeLayout android:id="@+id/maps_manager_menu" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" &gt; &lt;!-- Top --&gt; &lt;Button android:id="@+id/maps_manager_top_left" android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@string/empty" /&gt; &lt;Button android:id="@+id/maps_manager_top_middle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/maps_manager_top_left" android:contentDescription="@string/empty" /&gt; &lt;Button android:id="@+id/maps_manager_top_right" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/maps_manager_top_middle" android:contentDescription="@string/empty" /&gt; &lt;!-- Middle --&gt; &lt;Button android:id="@+id/maps_manager_middle_left" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/maps_manager_top_left" android:contentDescription="@string/empty" /&gt; &lt;Button android:id="@+id/maps_manager_middle_middle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/maps_manager_middle_left" android:layout_below="@id/maps_manager_top_middle" android:contentDescription="@string/empty" /&gt; &lt;Button android:id="@+id/maps_manager_middle_right" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/maps_manager_middle_middle" android:layout_below="@id/maps_manager_top_right" android:contentDescription="@string/empty" /&gt; &lt;!-- Bottom --&gt; &lt;Button android:id="@+id/maps_manager_bottom_left" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/maps_manager_middle_left" android:contentDescription="@string/empty" /&gt; &lt;Button android:id="@+id/maps_manager_bottom_middle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/maps_manager_bottom_left" android:layout_below="@id/maps_manager_middle_middle" android:contentDescription="@string/empty" /&gt; &lt;Button android:id="@+id/maps_manager_bottom_right" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/maps_manager_bottom_middle" android:layout_below="@id/maps_manager_middle_right" android:contentDescription="@string/empty" /&gt; &lt;/RelativeLayout&gt; &lt;RelativeLayout android:id="@+id/maps_manager_controls" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignBottom="true" android:layout_below="@id/maps_manager_menu" &gt; &lt;ToggleButton android:id="@+id/maps_manager_help" android:layout_width="wrap_content" android:layout_height="wrap_content" /&gt; &lt;/RelativeLayout&gt; &lt;/RelativeLayout&gt; </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.
 

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