0

I'm trying to build Scrollview that scrolls horizontally and vertically i tried the below code but its not working

   <?xml version="1.0" encoding="utf-8"?>
    <ScrollView android:id="@+id/ScrollView02" 
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content"
                xmlns:android="http://schemas.android.com/apk/res/android">
    <HorizontalScrollView android:id="@+id/HorizontalScrollView01" 
                          android:layout_width="wrap_content" 
                          android:layout_height="wrap_content">
   /// whatever goes here
    </HorizontalScrollView>
    </ScrollView>

from this post and tried this post too, is there any open source to this kind of View? Any help would be greatly appreciated.

Community
  • 1
  • 1
A.AL
  • 135
  • 3
  • 12

1 Answers1

0

Try this code snippet.

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

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

    <!-- put your subviews here -->

</HorizontalScrollView>

tounaobun
  • 14,570
  • 9
  • 53
  • 75