Why button is not centered vertically in LinearLayout?
<p>I have a LinearLayout, which only contains one button. I want this button to be centered vertically and aligned to the right. I tried many ways, but I couldn't make this button centered vertically. It is always aligned to the top. I also tried to put a button in RelativeLayout, the button can not be centered vertically either. </p>

<p>The XML is as below. Is there anything wrong with this layout? Thanks.</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="wrap_content" android:background="#E8E3E4"&gt;
    &lt;Button 
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:text="More" android:layout_gravity="right" /&gt;
&lt;/LinearLayout&gt;
</code></pre>

<hr>

<p>Changing android:layout_gravity="right" to android:layout_gravity="right|center_vertical" didn't resolve the problem in my question. </p>
