Class FlexibleView
Definition
- Namespace:
- Tizen.NUI.Components
- Assembly:
- Tizen.NUI.Components.dll
A flexible view for providing a limited window into a large data set.
public class FlexibleView : Control, IDynamicResourceHandler, INameScope, System.IDisposable, IResourcesProvider
- Inheritance
-
objectFlexibleView
- Implements
-
System.IDisposable
Constructors
View SourceFlexibleView()
Creates a FlexibleView instance.
Declaration
public FlexibleView()
Fields
View SourceFocusedItemIndexProperty
FocusedItemIndexProperty
Declaration
public static readonly BindableProperty FocusedItemIndexProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
INVALID_TYPE
Constant value: -1.
Declaration
public static readonly int INVALID_TYPE
Field Value
| Type | Description |
|---|---|
| int |
NO_POSITION
Constant value: -1.
Declaration
public static readonly int NO_POSITION
Field Value
| Type | Description |
|---|---|
| int |
PaddingProperty
PaddingProperty
Declaration
public static readonly BindableProperty PaddingProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
Properties
View SourceFocusedItemIndex
Gets or sets the focused item index(adapter position).
Declaration
public int FocusedItemIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Padding
overwrite the Padding.
Declaration
public Extents Padding { get; set; }
Property Value
| Type | Description |
|---|---|
| Extents |
Methods
View SourceAttachScrollBar(ScrollBar)
Attach a scrollbar to this FlexibleView.
Declaration
public void AttachScrollBar(ScrollBar scrollBar)
Parameters
| Type | Name | Description |
|---|---|---|
| ScrollBar | scrollBar | ScrollBar |
CreateViewStyle()
you can override it to create your own default style.
Declaration
protected override ViewStyle CreateViewStyle()
Returns
| Type | Description |
|---|---|
| ViewStyle |
Overrides
View SourceDetachScrollBar()
Detach the scrollbar from this FlexibleView.
Declaration
public void DetachScrollBar()
Dispose(DisposeTypes)
you can override it to clean-up your own resources.
Declaration
protected override void Dispose(DisposeTypes type)
Parameters
| Type | Name | Description |
|---|---|---|
| DisposeTypes | type | DisposeTypes |
Overrides
View SourceFindViewHolderForAdapterPosition(int)
Return the FlexibleViewViewHolder for the item in the given position of the data set. This method checks only the children of FlexibleViewRecyclerView. If the item at the given position is not laid out, it will not create a new one.
Declaration
public FlexibleViewViewHolder FindViewHolderForAdapterPosition(int position)
Parameters
| Type | Name | Description |
|---|---|---|
| int | position | The position of the item in the data set of the adapter |
Returns
| Type | Description |
|---|---|
| FlexibleViewViewHolder |
FindViewHolderForLayoutPosition(int)
Return the FlexibleViewViewHolder for the item in the given position of the data set as of the latest layout pass. This method checks only the children of FlexibleViewRecyclerView. If the item at the given position is not laid out, it will not create a new one.
Declaration
public FlexibleViewViewHolder FindViewHolderForLayoutPosition(int position)
Parameters
| Type | Name | Description |
|---|---|---|
| int | position | The position of the item in the data set of the adapter |
Returns
| Type | Description |
|---|---|
| FlexibleViewViewHolder |
GetAdapter()
Retrieves the previously set adapter or null if no adapter is set.
Declaration
public FlexibleViewAdapter GetAdapter()
Returns
| Type | Description |
|---|---|
| FlexibleViewAdapter |
GetLayoutManager()
Return the FlexibleViewLayoutManager currently responsible for layout policy for this FlexibleView.
Declaration
public FlexibleViewLayoutManager GetLayoutManager()
Returns
| Type | Description |
|---|---|
| FlexibleViewLayoutManager |
GetRecycler()
Return the recycler instance.
Declaration
public FlexibleViewRecycler GetRecycler()
Returns
| Type | Description |
|---|---|
| FlexibleViewRecycler |
MoveFocus(Direction)
Move focus by direction.
Declaration
public void MoveFocus(FlexibleViewLayoutManager.Direction direction)
Parameters
| Type | Name | Description |
|---|---|---|
| FlexibleViewLayoutManager.Direction | direction | Direction. Should be "Left", "Right", "Up" or "Down" |
OnRelayout(Vector2, RelayoutContainer)
you can override it to relayout elements.
Declaration
public override void OnRelayout(Vector2 size, RelayoutContainer container)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | size | |
| RelayoutContainer | container |
Overrides
View SourceScrollToPositionWithOffset(int, int)
Convenience method to scroll to a certain position
Declaration
public void ScrollToPositionWithOffset(int position, int offset)
Parameters
| Type | Name | Description |
|---|---|---|
| int | position | Adapter position |
| int | offset | The distance (in pixels) between the start edge of the item view and start edge of the FlexibleView. |
SetAdapter(FlexibleViewAdapter)
Set a new adapter to provide child views on demand.
Declaration
public void SetAdapter(FlexibleViewAdapter adapter)
Parameters
| Type | Name | Description |
|---|---|---|
| FlexibleViewAdapter | adapter |
SetLayoutManager(FlexibleViewLayoutManager)
Set the FlexibleViewLayoutManager that this FlexibleView will use.
Declaration
public void SetLayoutManager(FlexibleViewLayoutManager layoutManager)
Parameters
| Type | Name | Description |
|---|---|---|
| FlexibleViewLayoutManager | layoutManager |
Events
View SourceItemClicked
Item click event.
Declaration
public event EventHandler<FlexibleViewItemClickedEventArgs> ItemClicked
Event Type
| Type | Description |
|---|---|
| EventHandler<><FlexibleViewItemClickedEventArgs> |
ItemTouch
Item touch event.
Declaration
public event EventHandler<FlexibleViewItemTouchEventArgs> ItemTouch
Event Type
| Type | Description |
|---|---|
| EventHandler<><FlexibleViewItemTouchEventArgs> |
StyleChanged
Style changed, for example default font size.
Declaration
public event EventHandler<StyleManager.StyleChangedEventArgs> StyleChanged
Event Type
| Type | Description |
|---|---|
| EventHandler<><StyleChangedEventArgs> |