Your experience on this site will be improved by allowing cookies
To scroll the child elements of a pallet inside a ScrollView, the Android ScrollView is used whose functionality is provided by the android.widget.ScrollView class. The default scroll view in Android is a vertical scroll view. As the name itself suggests, it scrolls the elements vertically. Similarly, for horizontal ScrollView, the HorizontalScrollView is used in Android.
Example:
activity_main.xml:
In the activity_main.xml file, we will drag the ScrollView from the palette and will place some palette elements inside it.
Activity class:(File: MainActivity.java) In the MainActivity.java file, no new code is added.
|
0 comments