title: Placing text view over an image view using FrameLayout
body: <p>Below is how I have designed my xml. Now what I am trying to fit a textview inside the white box shown below. But am being restricted by FrameLayout (at least I think so) that I need to hard code values to make the text view fit in the middle or some where inside the white box. I cannot use Relative or other layouts for this purpose as I have understood by my trials as this whole is a single image.</p>
  
  <p>Here is my layout,</p>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content" android:layout_height="wrap_content"
      android:visibility="visible" android:layout_marginTop="60dip"
      android:layout_gravity="center" android:id="@+id/xxx"&gt;
  
      &lt;ImageView android:id="@+id/calloutquizImage" 
          android:background="@drawable/callout" android:layout_width="wrap_content"
          android:layout_height="wrap_content" android:scaleType="fitCenter" /&gt;
  
      &lt;ImageView android:id="@+id/triviaImage"
          android:layout_width="wrap_content" android:layout_height="wrap_content"
          android:layout_alignTop="@+id/calloutquizImage" android:layout_gravity="left"
          android:src="@drawable/trivia" android:background="@drawable/trivia"
          android:layout_marginTop="50dip" android:layout_marginLeft="85dip"&gt;&lt;/ImageView&gt;
  
      &lt;TextView android:text="TextView" android:id="@+id/triviAnswerText"
          android:layout_marginTop="125dip" android:layout_marginLeft="85dip"
          android:layout_gravity="left" android:layout_width="wrap_content"
          android:layout_height="wrap_content" android:textColor="#000000"
          android:typeface="sans"&gt;&lt;/TextView&gt;
  
      &lt;ImageButton android:id="@+id/triviaanswercloseButton"
          android:src="@drawable/closebtn" android:layout_width="wrap_content"
          android:layout_height="wrap_content" android:background="@drawable/closebtn"
          android:layout_marginRight="8dip" android:layout_marginTop="43dip"
          android:layout_gravity="right" android:onClick="triviaanswerClose"&gt;&lt;/ImageButton&gt;
      &lt;ImageView android:id="@+id/buttontoclose"
          android:layout_gravity="left"
          android:visibility="visible" android:onClick="triviaanswerClose" 
          android:layout_marginTop="50dip" android:layout_marginLeft="75dip"
          android:layout_width="230dip" android:layout_height="170dip"&gt;&lt;/ImageView&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>Because of this the text view looks in different positions in various handsets.</p>
  
  <p>Any guesses what can be done for this instead?</p>
  
  <p>Below is my image :</p>
  
  <p><img src="https://i.stack.imgur.com/7O0mB.png" alt="enter image description here"></p>