java.lang.Object | |||
↳ | com.neomades.ui.View | ||
↳ | com.neomades.ui.AbsListView | ||
↳ | com.neomades.ui.HorizontalListView |
A HorizontalListView
is a horizontal list of views, where only
one view can be clicked at the same time.
The behavior is the same as ListView. The only difference is the orientation.
See ListView
for further details.
[Expand]
Inherited XML Attributes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
HorizontalListView()
Creates a new horizontal view.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
scrollToLeft()
Move the scrolled position to the first item of your
HorizontalListView . | ||||||||||
void |
scrollToPosition(int itemPosition)
Set the scrolled position of your
HorizontalListView . | ||||||||||
void |
setColumnWidth(int width)
Sets the column width in DP unit for every column.
| ||||||||||
void |
setColumnWidthAdapter(ColumnWidthAdapter columnWidthAdapter)
Sets an adapter for the column width.
| ||||||||||
void |
setPagerEnabled(boolean enabled)
Enables or disables the pager mode.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a new horizontal view.
Move the scrolled position to the first item of your
HorizontalListView
.
Set the scrolled position of your HorizontalListView
.
If the position is higher than the item count, the HorizontalListView
is scrolled to the last item.
If the position is less than 0, the HorizontalListView
is scrolled to
the first item.
itemPosition | the item position to scroll to |
---|
Sets the column width in DP unit for every column.
Use this method to apply the same width to all columns.
width | the column width in DP |
---|
Sets an adapter for the column width.
The adapter gives a width for each column (could be different).
columnWidthAdapter | an adapter or null |
---|
Enables or disables the pager mode. If set to true, when going left or right the content stops on multiples of the list width instead of scrolling evenly. Disabled by default.
The content width should be a multiple of HorizontalListView
width to
have better results.
enabled | true to enable |
---|