I made a TextView
scrollable if it has more than 5 lines. Now I want dynamically in my java code to detect if the same TextView
is scrollable or can scroll so I can change the visibility of a view below it.
I tried:
textView.setText(description);
textView.setMovementMethod(new ScrollingMovementMethod());
if(textView.getLineCount() > 5)
{
view.setVisibility(View.VISIBLE);
}
but the textView.getLineCount()
is equal to 0.
Also tried the function canScrollHorizontally(int direction)
but Google's documentation doesn't say which parameter should I use.