title: How to center a textview inside a linearlayout
body: <p>I have the following layout i'd like to make the textview appear in the center and middle of the view. How can i acheive this?</p>
  
  <p>I've tried adjusting the various gravity attributes when looking at the layout in graphical view, but nothing seems to change it. I'd like the textview in the center which i've done but halfway down the view.</p>
  
  <p>thanks matt.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:background="@drawable/carefreebgscaledalphajpg" &gt;
  
  
  
      &lt;TextView
          android:id="@+id/textviewdatefornocallspage"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:gravity="center"
          android:text="You have no calls for "
          android:textSize="25sp" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>