Your experience on this site will be improved by allowing cookies
The Horizontal ScrollView in Android is a FrameLayout which is used to scroll the child elements or views in a horizontal direction. The functionality of a horizontal scroll view in Android is facilitated by the android.widget.HorizontalScrollView class.As the name itself suggests, it only supports horizontal scrolling. Vertical ScrollView can be used in Android for vertical scrolling.
activity_main.xml:
In the activity_main.xml file, we will drag the HorizontalScrollView from the palette and will place some views or elements inside it.
Activity class: In the MainActivity.java, no code is added other than the auto-generated code itself.
|
0 comments