Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid layout correct alignment
    primarykey
    data
    text
    <p>I am working on a project and I have run into some problems. I haven't worked with the layouts very much so I don't know if this is possible or not.</p> <p>In the picture I have added the project mock-up. For the lower screen resolution it looks fine, but when I put the app on 5 inch device, this orange area is too high and I wanted to know if it is possible somehow to get that area centered.</p> <p><img src="https://i.stack.imgur.com/Y2PTi.png" alt="enter image description here"></p> <p>The orange area is a LinearLayout and everything is wrapped inside LinearLayout. Hope you understand what I mean I what I am asking.</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffff0000" android:orientation="vertical" android:paddingLeft="16dp" android:paddingRight="16dp" &gt; &lt;LinearLayout android:id="@+id/first" android:layout_width="match_parent" android:layout_height="76dp" android:background="#175797" android:orientation="vertical" &gt; &lt;EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Subject" /&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:id="@+id/second" android:layout_width="match_parent" android:layout_height="100dp" android:background="#00FFFF" android:orientation="vertical" &gt; &lt;Button android:layout_width="100dp" android:layout_height="wrap_content" android:text="Send" /&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:layout_gravity="bottom" android:id="@+id/third" android:layout_width="match_parent" android:layout_height="200dp" android:background="#FFA500" android:orientation="horizontal" &gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>This is code for the mock-up. For the project it's pretty much the same</p>
    singulars
    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.
 

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