Class FlexibleViewLayoutManager
Definition
- Namespace:
- Tizen.NUI.Components
- Assembly:
- Tizen.NUI.Components.dll
A FlexibleViewLayoutManager is responsible for measuring and positioning item views within a FlexibleView as well as determining the policy for when to recycle item views that are no longer visible to the user.
C#Copypublic abstract class FlexibleViewLayoutManager : Disposable
- Inheritance
- Derived
Properties
ChildCount
Return the current number of child views attached to the parent FlexibleView.
Declaration
C#Copypublic int ChildCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Declaration
C#Copypublic int FocusPosition { get; }
Property Value
Type | Description |
---|---|
Int32 |
Declaration
C#Copypublic float Height { get; }
Property Value
Type | Description |
---|---|
Single |
Declaration
C#Copypublic int ItemCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Declaration
C#Copypublic int PaddingBottom { get; }
Property Value
Type | Description |
---|---|
Int32 |
Declaration
C#Copypublic int PaddingLeft { get; }
Property Value
Type | Description |
---|---|
Int32 |
Declaration
C#Copypublic int PaddingRight { get; }
Property Value
Type | Description |
---|---|
Int32 |
Declaration
C#Copypublic int PaddingTop { get; }
Property Value
Type | Description |
---|---|
Int32 |
Declaration
C#Copypublic float Width { get; }
Property Value
Type | Description |
---|---|
Single |
Methods
AddView(FlexibleViewViewHolder)
Add a view to the currently attached FlexibleView if needed.
FlexibleViewLayoutManagers should use this method to add views obtained from a FlexibleViewRecycler using getViewForPosition(int).
Declaration
C#Copypublic void AddView(FlexibleViewViewHolder holder)
Parameters
Type | Name | Description |
---|---|---|
FlexibleViewViewHolder | holder | view to add |
AddView(FlexibleViewViewHolder, Int32)
Add a view to the currently attached FlexibleView if needed.
FlexibleViewLayoutManagers should use this method to add views obtained from a FlexibleViewRecycler using getViewForPosition(int).
Declaration
C#Copypublic void AddView(FlexibleViewViewHolder holder, int index)
Parameters
Type | Name | Description |
---|---|---|
FlexibleViewViewHolder | holder | view to add |
Int32 | index | index to add child at |
CanScrollHorizontally()
Query if horizontal scrolling is currently supported. The default implementation returns false.
Declaration
C#Copypublic virtual bool CanScrollHorizontally()
Returns
Type | Description |
---|---|
Boolean |
CanScrollVertically()
Query if vertical scrolling is currently supported. The default implementation returns false.
Declaration
C#Copypublic virtual bool CanScrollVertically()
Returns
Type | Description |
---|---|
Boolean |
Declaration
C#Copypublic void ChangeFocus(int focusPosition)
Parameters
Type | Name | Description |
---|---|---|
Int32 | focusPosition | the newly focus position |
Declaration
C#Copypublic virtual float ComputeScrollExtent()
Returns
Type | Description |
---|---|
Single |
Declaration
C#Copypublic virtual float ComputeScrollOffset()
Returns
Type | Description |
---|---|
Single |
Declaration
C#Copypublic virtual float ComputeScrollRange()
Returns
Type | Description |
---|---|
Single |
Declaration
C#Copyprotected override void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type | Dispose type. |
Overrides
Declaration
C#Copyprotected virtual FlexibleViewViewHolder FindFirstVisibleItemView()
Returns
Type | Description |
---|---|
FlexibleViewViewHolder |
FindItemViewByPosition(Int32)
Finds the view which represents the given adapter position.
Declaration
C#Copypublic FlexibleViewViewHolder FindItemViewByPosition(int position)
Parameters
Type | Name | Description |
---|---|---|
Int32 | position | adapter position |
Returns
Type | Description |
---|---|
FlexibleViewViewHolder |
Declaration
C#Copyprotected virtual FlexibleViewViewHolder FindLastVisibleItemView()
Returns
Type | Description |
---|---|
FlexibleViewViewHolder |
Declaration
C#Copypublic FlexibleViewViewHolder GetChildAt(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | child index |
Returns
Type | Description |
---|---|
FlexibleViewViewHolder |
GetNextPosition(Int32, FlexibleViewLayoutManager.Direction)
Retrieves a position that neighbor to current position by direction.
Declaration
C#Copyprotected abstract int GetNextPosition(int position, FlexibleViewLayoutManager.Direction direction)
Parameters
Type | Name | Description |
---|---|---|
Int32 | position | The anchor adapter position |
FlexibleViewLayoutManager.Direction | direction | The direction. |
Returns
Type | Description |
---|---|
Int32 |
LayoutChild(FlexibleViewViewHolder, Single, Single, Single, Single)
Lay out the given child view within the FlexibleView using coordinates that include view margins.
Declaration
C#Copypublic void LayoutChild(FlexibleViewViewHolder child, float left, float top, float width, float height)
Parameters
Type | Name | Description |
---|---|---|
FlexibleViewViewHolder | child | Child to lay out |
Single | left | Left edge, with item view left margin included |
Single | top | Top edge, with item view top margin included |
Single | width | Width, with item view left and right margin included |
Single | height | Height, with item view top and bottom margin included |
OffsetChildrenHorizontal(Single, Boolean)
Offset all child views attached to the parent FlexibleView by dx pixels along the horizontal axis.
Declaration
C#Copypublic void OffsetChildrenHorizontal(float dx, bool immediate)
Parameters
Type | Name | Description |
---|---|---|
Single | dx | Pixels to offset by |
Boolean | immediate | specify if the offset need animation |
OffsetChildrenVertical(Single, Boolean)
Offset all child views attached to the parent FlexibleView by dy pixels along the vertical axis.
Declaration
C#Copypublic void OffsetChildrenVertical(float dy, bool immediate)
Parameters
Type | Name | Description |
---|---|---|
Single | dy | Pixels to offset by |
Boolean | immediate | specify if the offset need animation |
OnLayoutChildren(FlexibleViewRecycler)
Layout all relevant child views from the given adapter.
Declaration
C#Copypublic abstract void OnLayoutChildren(FlexibleViewRecycler recycler)
Parameters
Type | Name | Description |
---|---|---|
FlexibleViewRecycler | recycler | Recycler to use for fetching potentially cached views for a position |
Declaration
C#Copypublic virtual void OnLayoutCompleted()
RecycleChildren(FlexibleViewRecycler, Int32, Int32, Boolean)
Recycles children between given indices..
Declaration
C#Copypublic void RecycleChildren(FlexibleViewRecycler recycler, int startIndex, int endIndex, bool immediate)
Parameters
Type | Name | Description |
---|---|---|
FlexibleViewRecycler | recycler | Recycler to recycle views into |
Int32 | startIndex | inclusive |
Int32 | endIndex | exclusive |
Boolean | immediate | recycle immediately or add to pending list and recycle later. |
RelayoutRequest()
Calls {@code FlexibleView#RelayoutRequest} on the underlying FlexibleView.
Declaration
C#Copypublic void RelayoutRequest()
Declaration
C#Copypublic void RemoveAndRecycleViewAt(int index, FlexibleViewRecycler recycler)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | |
FlexibleViewRecycler | recycler |
ScrapAttachedViews(FlexibleViewRecycler)
Temporarily detach and scrap all currently attached child views. Views will be scrapped into the given FlexibleViewRecycler. The FlexibleViewRecycler may prefer to reuse scrap views before other views that were previously recycled.
Declaration
C#Copypublic void ScrapAttachedViews(FlexibleViewRecycler recycler)
Parameters
Type | Name | Description |
---|---|---|
FlexibleViewRecycler | recycler | Recycler to scrap views into |
ScrollHorizontallyBy(Single, FlexibleViewRecycler, Boolean)
Scroll horizontally by dy pixels in screen coordinates.
Declaration
C#Copypublic virtual float ScrollHorizontallyBy(float dy, FlexibleViewRecycler recycler, bool immediate)
Parameters
Type | Name | Description |
---|---|---|
Single | dy | distance to scroll in pixels. Y increases as scroll position approaches the top. |
FlexibleViewRecycler | recycler | Recycler to use for fetching potentially cached views for a position |
Boolean | immediate | Specify if the scroll need animation |
Returns
Type | Description |
---|---|
Single |
Declaration
C#Copypublic virtual void ScrollToPosition(int position)
Parameters
Type | Name | Description |
---|---|---|
Int32 | position | Scroll to this adapter position |
ScrollToPositionWithOffset(Int32, Int32)
Scroll to the specified adapter position with the given offset from resolved layout start.
Declaration
C#Copypublic virtual void ScrollToPositionWithOffset(int position, int offset)
Parameters
Type | Name | Description |
---|---|---|
Int32 | position | Scroll to this adapter position |
Int32 | offset | The distance (in pixels) between the start edge of the item view and start edge of the FlexibleView. |
ScrollVerticallyBy(Single, FlexibleViewRecycler, Boolean)
Scroll vertically by dy pixels in screen coordinates.
Declaration
C#Copypublic virtual float ScrollVerticallyBy(float dy, FlexibleViewRecycler recycler, bool immediate)
Parameters
Type | Name | Description |
---|---|---|
Single | dy | distance to scroll in pixels. Y increases as scroll position approaches the top. |
FlexibleViewRecycler | recycler | Recycler to use for fetching potentially cached views for a position |
Boolean | immediate | Specify if the scroll need animation |
Returns
Type | Description |
---|---|
Single |