2010-03-11 10 views

답변

1

: 당신이있는 ScrollView를 사용하는 경우 그러나, 그것은 수평 스크롤을 지원하지 않습니다, 뷰의 당신의 XML 정의에

android:scrollbars="horizontal" 

, 그래서 막대가 표시되지 않습니다 ...

+0

는 ... – Amit

+0

이런 식으로 작동하지 않는 그것은 작동하지 않습니다 여기 그냥 작업을 수행하는 방법에 대한 자습서입니다 왜냐하면 지원되지 않기 때문입니다. android doc을 보면 세로 스크롤 만 메서드에 정의 된 것을 볼 수 있습니다 : http://developer.android.com/intl/fr/reference/android/widget/ScrollView.html 보기를 변경해야합니다. 예를 들어 선형 레이아웃의 컨테이너 – Sephy

1

스크롤 속성 태그에 put 특성이 있습니다.

android:scrollbars="horizontal" 
+0

scrollview가 수평 스크롤 막대를 지원하지 않는다고 생각합니다. http://groups.google.com/group/android-developers/browse_thread/thread/d675b7ed8ea72091 – Sephy

+0

두 스크롤 막대에 모두 액세스해야하는 경우 파이프 (|) 그 사이. android : scrollbars = "horizontal | vertical" – Praveen

+0

파이프 메소드가 작동하지 않는 것 같습니다 ... – Amit

6

1.5에서 추가되었다, 그것은 u는 원하는 것을 할 수있다.

<ScrollView 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent"> 

     <HorizontalScrollView 
      android:layout_width="fill_parent"   
      android:layout_height="fill_parent" > 

       <TableLayout 
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent"> 

        <TableRow 
         android:layout_width="fill_parent" 
         android:layout_height="fill_parent"> 
         <ImageView android:src="@drawable/icon"/> 
         <ImageView android:src="@drawable/tube"/> 
        </TableRow> 

        <TableRow .... 
        </TableRow> 

        <TableRow .... 
        </TableRow> 

       </TableLayout> 

     </HorizontalScrollView> 

    </ScrollView>