i want to know how many line in my text view. i already set mytextview text, then i want to get how many line it take in mytextview.
i use mytextview.getLineCount()
you can check the TextView parameters inside onCreateOptionsMenu()
@Override
public boolean onCreateOptionsMenu(Menu menu) {
TextView tv1 = (TextView)findViewById(R.id.textView);
Rect rect = new Rect();
int c = tv1.getLineCount();
tv1.getLineBounds(0, rect);
tv1.getLineBounds(1, rect);
return true;
}