TableLayout ScrollView Vertical & Horizontal

前端 未结 4 1336
一整个雨季
一整个雨季 2020-12-19 12:27

How we can setup ScrollView vertically & horizontally? I tried the below code, but it didn\'t work.



        
4条回答
  •  旧巷少年郎
    2020-12-19 12:49

    Try,

    • Set the android:scrollbarFadeDuration="0"

                 OR 
      
    • ScrollView1.setScrollbarFadingEnabled(false);

                 OR
      
    • android:scrollbarFadeDuration="0" and

      android:scrollbarAlwaysDrawVerticalTrack="true" for vertical

      android:scrollbarAlwaysDrawHorizontalTrack="true" for horizontal

    And one more thing,

    Remember, the ScrollView can have only one child control, so we can make a container (Linear, relative, Table Layouts) the child of the ScrollView and put all the controls inside this child.

    For reference: http://android-pro.blogspot.com/2010/02/android-scrollview.html

提交回复
热议问题