Greetings Tell me how to deal with the following problem: There is a TextView nested in ScrollView; Trying to hide the scroll bar

scrollView.setVerticalScrollBarEnabled(false); 

Then I scroll

 scrollView.smoothScrollTo(0, iScrollY); 

Still, the screen displays a scroll bar at the time of the move; How to hide the scrollbar?

 runOnUiThread(new Runnable() { @Override public void run() { scrollView.post(new Runnable() { @Override public void run() { Log.e(" new Runnable", "///////////////////////"); iScrollY = contentNavigate.GetSuflerScrollPosition(); ScrollView scrollView = (ScrollView) findViewById(R.id.scrollView); scrollView.setVerticalScrollBarEnabled(false); scrollView.smoothScrollTo(0, iScrollY); scrollView.setVerticalScrollBarEnabled(true); } }); } }); 
  • And if you add it: view.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY) ? - Yuriy SPb
  • It did not help ... Maybe this is a TextView scrolling and not a ScrollView ?! How to check ? - santavital
  • Well, if the Collie has a height in wrap_content set for TextView, then there shouldn't be a scrollbar on it. - Yuriy SPb

1 answer 1

Try, also, to turn off not only vertical, but also horizontal scrolling.

 scrollView.setVerticalScrollBarEnabled(false); scrollView.setHorizontalScrollBarEnabled(false); 
  • Did not help (Can there be another option how to set the type of scroll bar? - santavital