title: Set the height of a Textview so as to enter into a LinearLayout
body: <p>i have a LinearLayout with contain a TextView. 
  i want that the text of textView is all visible calculating the height of Layout and setting the height of Textview.</p>
  
  <pre><code> &lt;LinearLayout
      android:orientation="vertical"
      android:id="@+id/layoutTot"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_above="@+id/buttonClipBoard"&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text=" text text text text text text text text"
          android:id="@+id/textTags"
          /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>can you help me?</p>
  
  <p>i try it:</p>
  
  <pre><code>final LinearLayout l = (LinearLayout) findViewById(R.id.layoutTot);
  
      l.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
          @Override
          public void onGlobalLayout() {
              int height_ = l.getMeasuredHeight();
  
              final TextView t = (TextView) findViewById(R.id.text);
  
          }
      });
  </code></pre>