how to get how many lines are displayed in visible part of TextView
? I use text, which not fully placed in TextView
on every screen resolution.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/logs_text"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
String s = "very big text"
TextView logText = (TextView) view.findViewById(R.id.logs_text);
logText.setText(s);