Question

Im using a simple ValueAnimator to animate a LinearLayout's height UP or DOWN.

As I add a new child I use a onPreDrawListener to set the height to what it was prior to the child being added, and then I simply animate the height to the new height.

The animation works good. Problem is, since the TextView isnt fully visible at the start it shows a small scrollbar next to it until its content can be seen on screen.

My question is, how can I totally disable this scrollbar?

Ive tried setting the scrollbars value in xml to none with no change, Ive also tried changing the default fade delay of the scrollbar but it doesnt seem to affect it at all.

Hope theres someone out there who knows a solution. Thanks in advance!

Was it helpful?

Solution

Solved it by creating the TextView through XML and adding these two lines.

android:scrollbarThumbVertical="@android:color/transparent"
android:scrollbarTrackVertical="@android:color/transparent"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top