title: How to determine the number of lines visible in TextView?
body: <p>how to get how many lines are displayed in visible part of <code>TextView</code>? I use text, which not fully placed in <code>TextView</code> on every screen resolution.</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" &gt;
  
  &lt;TextView
      android:id="@+id/logs_text"
      android:layout_width="match_parent"
      android:layout_height="match_parent" /&gt;
  
  &lt;/LinearLayout&gt;
  
  String s = "very big text"
  TextView logText = (TextView) view.findViewById(R.id.logs_text);
  logText.setText(s);     
  </code></pre>