title: Android layout _background fit it's content
body: <p>I am trying to design a custom dialog.
  The problem I met was..the background of the textview ,which is the body of the dialog can't change whenever the text get more line ..
  wrap_content didn't work .... </p>
  
  <p>PS (there are there part , title , content, buttons )
   ( title and content are two TextView  with two  image as background)</p>
  
  <p>one line is fine</p>
  
  <p><img src="https://i.stack.imgur.com/HvmCx.png" alt="enter image description here"></p>
  
  <p>but when lines increased... they were eaten !! </p>
  
  <p><img src="https://i.stack.imgur.com/xipW9.jpg" alt="enter image description here"></p>
  
  <p>if I use wrap_content ... it goes too big ! 
  <a href="https://www.dropbox.com/s/in78b8gg0hfkfxh/toobig.png" rel="nofollow noreferrer">https://www.dropbox.com/s/in78b8gg0hfkfxh/toobig.png</a></p>
  
  <p>here is the code of xml 
  `
  
  
  <pre><code>android:orientation="vertical"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:gravity="center_vertical|center_horizontal"
  &gt;
  
  &lt;LinearLayout
      android:id="@+id/dialog"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"       
      android:paddingTop="120dip" 
    &gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="100dip"
          android:orientation="vertical"
           &gt;
  
          &lt;TextView
              android:id="@+id/textView1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:background="@drawable/title"
              android:text="Title"
              style="@style/TitleStyle"
              android:gravity="bottom|center_horizontal"
              android:paddingBottom="15dip"
              /&gt;
  
      &lt;/LinearLayout&gt;
  
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="89dip"
          android:background="@drawable/content"
          android:orientation="vertical" &gt;
  
          &lt;TextView
              android:id="@+id/textView2"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="L\na\ny\no\nu\nt\n"
              android:gravity="center"
              style="@style/TextStyle"
              android:paddingRight="20dip"
              android:paddingLeft="20dip"             
              android:paddingTop="10dip"
  
                /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
  
          android:gravity="center"
          android:padding="0dip"
          android:paddingTop="0dip" &gt;
  
          &lt;Button
              android:id="@+id/dialog_button_cancel"
              android:layout_width="0dip"
              android:layout_height="51dip"
              android:layout_weight="0.50"
              style="@style/BtnStyle"
              android:background="@drawable/btn_action"
              android:src="@drawable/btn"
              android:text="取消"             
  
              android:gravity="center"
               /&gt;
  
          &lt;Button
              android:id="@+id/dialog_button_ok"
              android:layout_width="0dip"
              android:layout_height="51dip"
              android:layout_weight="0.50"
              android:background="@drawable/btn_action"
              android:src="@drawable/btn"
              android:layout_marginLeft="10dip"  
              style="@style/BtnStyle"       
              android:text="確定"
               android:gravity="center"
                /&gt;
      &lt;/LinearLayout&gt; 
  
  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>`</p>