1

I know how to achieve scrollbar fading by declaring in our xml layout file when i have set this attribute over scrollview generated at runtime i didnt have any idea how to achieve.

 <ScrollView
        android:id="@+id/scrollView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_x="0dp"
        android:layout_y="0dp"
        android:scrollbarFadeDuration="5" >



HorizontalScrollView sv=new HorizontalScrollView(this);
          sv.addView(n);
          sv.pageScroll(0);
          sv.setBackgroundColor(0);

          sv.setScrollbarFadingEnabled(true);
          sv.setHorizontalFadingEdgeEnabled(true);

I wanted to set invisible scrollbar in above horizontal scroll view created at runtime. Please guide me .Thanks in Advance.

0

1 Answer 1

2

Try adding

sv.setHorizontalScrollBarEnabled(false);
sv.setVerticalScrollBarEnabled(false);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.