title: Help Arranging TextView objects on screen in Android
body: <p>I'm using textview objects to hold labels such as Score, Level etc on my game screen but they don't seem to be displayed where I want them to be. I understand about view hierarchies (parents, children) and am using the gravity tags in the XML layout file but it doesnt seem to have any effect. </p>
  
  <p>Could someone just quickly provide a guide to positioning a textview object on the screen, and also linking it in the code so that its contents can be programmatically controlled (I believe this would by done via =(TextView) findViewById(r.id.resourcename))?</p>
  
  <p>Many thanks</p>
  
  <p>XML:
      </p>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  &gt;
  
      &lt;android.gesture.GestureOverlayView
   xmlns:android="http://schemas.android.com/apk/res/android"
   android:id="@+id/gestures"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:gestureStrokeWidth="2.0"
  
  
   android:gestureStrokeType="multiple"
   android:eventsInterceptionEnabled="true"&gt;
  
  
   &lt;com.darius.android.distractions.DistractionsView
    android:id="@+id/distractions_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/&gt;
  
  
  
  
   &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
      &lt;TextView
        android:id="@+id/text"
                android:text="Hello"
                android:visibility="visible"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:gravity="center_horizontal"
        android:textColor="#88ffffff"
        android:textSize="24sp"/&gt;
  
        &lt;TextView
        android:id="@+id/textLevel"
                android:text="@string/level_count"
                android:visibility="visible"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:gravity="bottom"
        android:textColor="#EB0000"
        android:textSize="10sp"/&gt;
  
  
   &lt;TextView  android:layout_height="wrap_content" 
              android:layout_width="wrap_content" 
              android:text="@string/concentration_bar"
              android:textColor = "#EB0000"
              android:textSize="10sp"
              android:id="@+id/conbartext" 
              android:visibility="visible"            
  
              &gt;&lt;/TextView&gt;
  
   &lt;/RelativeLayout&gt;
  
   &lt;/android.gesture.GestureOverlayView&gt;
    &lt;/FrameLayout&gt;
  </code></pre>