ScrollView for Xamarin.Android: Getting started
To be able to use RadScrollView you need to reference the following libraries:
- Telerik.Xamarin.Android.Common.dll
- Telerik.Xamarin.Android.Primitives.dll
RadScrollView is defined in the Primitives library in the com.telerik.widget.primitives.panels package. The following code snippet demonstrates how to add an instance of the component in your XML layout:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".examples.panels.ScrollViewFragment">
<com.telerik.widget.primitives.panels.RadScrollView
android:id="@+id/radScrollView"
app:scrollMode="horizontal|vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
//Your content comes here
</FrameLayout>
</com.telerik.widget.primitives.panels.RadScrollView>
As you can see, the ScrollMode is set to be horizontal|vertical in the XML definition, and a combination of the SCROLLING_MODE_VERTICAL and SCROLLING_MODE_HORIZONTAL flags in the programmatic definition.