Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to align linearlayout to vertical center?
    primarykey
    data
    text
    <p>I'm tyring to align linearlayout's vertical center which shows following pic (skycolor border) to delete button's vertical center.</p> <p>so I set gravity of id:groupNumbers to center_vertical.</p> <p>but no changed. </p> <p>How to align id:groupNumbers to buttons's center?</p> <p><img src="https://i.stack.imgur.com/Xo100.png" alt="enter image description here"></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="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"&gt; &lt;LinearLayout android:id="@+id/groupNumbers" android:orientation="horizontal" android:gravity="center_vertical" android:layout_weight="0.7" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt; &lt;LinearLayout android:orientation="horizontal" android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt; &lt;TextView android:id="@+id/txtSelected01" android:text="00" android:textSize="30dp" android:gravity="center_horizontal" android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content"/&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:orientation="horizontal" android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt; &lt;TextView android:id="@+id/txtSelected02" android:text="00" android:textSize="30dp" android:gravity="center_horizontal" android:layout_weight="1" android:layout_width="0dp" android:layout_height="wrap_content"/&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; &lt;Button android:id="@+id/btn_deleteNum" android:text="Delete" android:textSize="20dp" android:layout_weight="0.2" android:layout_width="wrap_content" android:layout_height="wrap_content"/&gt; &lt;/LinearLayout&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.
    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