ShinobiControls Xamarin Bindings Documentation

ShinobiControls.Android.Grids : ShinobiControls.Android.Grids.Core Namespace

IHasGridBehavior Interface

Describes grid-specific behavior.

Syntax

[Android.Runtime.Register("com/shinobicontrols/grids/core/HasGridBehavior", "", "ShinobiControls.Android.Grids.Core.IHasGridBehaviorInvoker")]
public interface IHasGridBehavior : Android.Runtime.IJavaObject, IDisposable

Remarks

Describes grid-specific behavior.

The ShinobiControls.Android.Grids.Core.GridRecyclerView implements the ShinobiControls.Android.Grids.Core.IHasGridBehavior interface and thus it describes a set of behavior distinct from the standard of which the ShinobiControls.Android.Grids.Core.GridRecyclerView is a subclass.

Custom implementations of this interface are not supported nor should they be necessary.

Requirements

Namespace: ShinobiControls.Android.Grids.Core
Assembly: ShinobiControls.Android.Grids (in ShinobiControls.Android.Grids.dll)
Assembly Versions: 1.0.0.0

Members

Public Methods

Member Details

GetColumnIndexForPosition Method

Syntax

[Android.Runtime.Register("getColumnIndexForPosition", "(I)I", "GetGetColumnIndexForPosition_IHandler:ShinobiControls.Android.Grids.Core.IHasGridBehaviorInvoker, ShinobiControls.Android.Grids")]
public int GetColumnIndexForPosition (int position)

Parameters

position
- the position to query

Returns

the index of the Column that corresponds to the given position, or -1 if position does not map to a Column

Remarks

Returns the index of the ShinobiControls.Android.Grids.Core.Column

that corresponds to the given position. This method helps translate between adapter positions, which are a

concept, and row and column indices which are specific to the ShinobiControls.Android.Grids.Core.ShinobiGridView

. This can be useful when creating custom

s.

If position

does not map to a Column, for example if position

is out of the range of all the valid positions, a value of -1

will be returned.

Requirements

Namespace: ShinobiControls.Android.Grids.Core
Assembly: ShinobiControls.Android.Grids (in ShinobiControls.Android.Grids.dll)
Assembly Versions: 1.0.0.0

GetHiddenItemPositions Method

Syntax

[Android.Runtime.Register("getHiddenItemPositions", "()[I", "GetGetHiddenItemPositionsHandler:ShinobiControls.Android.Grids.Core.IHasGridBehaviorInvoker, ShinobiControls.Android.Grids")]
public int[] GetHiddenItemPositions ()

Returns

the positions of all currently hidden items

Remarks

Returns the positions of all currently hidden items within this ShinobiControls.Android.Grids.Core.IHasGridBehavior

. A position can be converted to a row and column index using IHasGridBehavior.GetRowIndexForPosition(int)

and IHasGridBehavior.GetColumnIndexForPosition(int)

respectively. Modifying the returned array will have no effect on the hidden items within the grid.

Requirements

Namespace: ShinobiControls.Android.Grids.Core
Assembly: ShinobiControls.Android.Grids (in ShinobiControls.Android.Grids.dll)
Assembly Versions: 1.0.0.0

GetPosition Method

Syntax

[Android.Runtime.Register("getPosition", "(II)I", "GetGetPosition_IIHandler:ShinobiControls.Android.Grids.Core.IHasGridBehaviorInvoker, ShinobiControls.Android.Grids")]
public int GetPosition (int p0, int p1)

Parameters

p0
Documentation for this section has not yet been entered.
p1
Documentation for this section has not yet been entered.

Returns

the position for the item that is in the given column and row

Remarks

Returns the position that corresponds to the given column index and row index. This method helps translate between row and column indices, which are specific to the ShinobiControls.Android.Grids.Core.ShinobiGridView

, and adapter positions which are a

concept.

If columnIndex

and rowIndex

do not map to a valid position, for example if the column index is greater than the number of columns present, a value of -1

will be returned.

Requirements

Namespace: ShinobiControls.Android.Grids.Core
Assembly: ShinobiControls.Android.Grids (in ShinobiControls.Android.Grids.dll)
Assembly Versions: 1.0.0.0

GetRelativeParentRect Method

Syntax

[Android.Runtime.Register("getRelativeParentRect", "(Landroid/graphics/Rect;)V", "GetGetRelativeParentRect_Landroid_graphics_Rect_Handler:ShinobiControls.Android.Grids.Core.IHasGridBehaviorInvoker, ShinobiControls.Android.Grids")]
public void GetRelativeParentRect (Android.Graphics.Rect outRect)

Parameters

outRect
- filled with the bounds of this ShinobiControls.Android.Grids.Core.IHasGridBehavior's parent

Remarks

Returns a

that describes the bounds of this ShinobiControls.Android.Grids.Core.IHasGridBehavior

's parent. Importantly, this Rect will be relative to this ShinobiControls.Android.Grids.Core.IHasGridBehavior

. So, for example, if this ShinobiControls.Android.Grids.Core.IHasGridBehavior

relates to the ShinobiControls.Android.Grids.Core.GridRecyclerView

holding the data items of the grid, the top

value of this Rect may be negative if the grid has a header row.

Requirements

Namespace: ShinobiControls.Android.Grids.Core
Assembly: ShinobiControls.Android.Grids (in ShinobiControls.Android.Grids.dll)
Assembly Versions: 1.0.0.0

GetRowIndexForPosition Method

Syntax

[Android.Runtime.Register("getRowIndexForPosition", "(I)I", "GetGetRowIndexForPosition_IHandler:ShinobiControls.Android.Grids.Core.IHasGridBehaviorInvoker, ShinobiControls.Android.Grids")]
public int GetRowIndexForPosition (int position)

Parameters

position
- the position to query

Returns

the index of the row that corresponds to the given position, or -1 if position does not map to a row

Remarks

Returns the index of the row that corresponds to the given position. This method helps translate between adapter positions, which are a

concept, and row and column indices which are specific to the ShinobiControls.Android.Grids.Core.ShinobiGridView

. This can be useful when creating custom

s.

If position

does not map to a row, for example if position

is out of the range of all the valid positions, a value of -1

will be returned.

Requirements

Namespace: ShinobiControls.Android.Grids.Core
Assembly: ShinobiControls.Android.Grids (in ShinobiControls.Android.Grids.dll)
Assembly Versions: 1.0.0.0

GetSelectedItemPositions Method

Syntax

[Android.Runtime.Register("getSelectedItemPositions", "()[I", "GetGetSelectedItemPositionsHandler:ShinobiControls.Android.Grids.Core.IHasGridBehaviorInvoker, ShinobiControls.Android.Grids")]
public int[] GetSelectedItemPositions ()

Returns

the positions of all currently selected items

Remarks

Returns the positions of all currently selected items within this ShinobiControls.Android.Grids.Core.IHasGridBehavior

. A position can be converted to a row and column index using IHasGridBehavior.GetRowIndexForPosition(int)

and IHasGridBehavior.GetColumnIndexForPosition(int)

respectively. Modifying the returned array will have no effect on the selected items within the grid.

Requirements

Namespace: ShinobiControls.Android.Grids.Core
Assembly: ShinobiControls.Android.Grids (in ShinobiControls.Android.Grids.dll)
Assembly Versions: 1.0.0.0

IsItemSelected Method

Syntax

[Android.Runtime.Register("isItemSelected", "(I)Z", "GetIsItemSelected_IHandler:ShinobiControls.Android.Grids.Core.IHasGridBehaviorInvoker, ShinobiControls.Android.Grids")]
public bool IsItemSelected (int position)

Parameters

position
- the position of the item

Returns

true if the item is selected, otherwise false

Remarks

Returns whether the item at the given position is selected. If no row or column exists in the grid for the given position then this will return false.

Requirements

Namespace: ShinobiControls.Android.Grids.Core
Assembly: ShinobiControls.Android.Grids (in ShinobiControls.Android.Grids.dll)
Assembly Versions: 1.0.0.0

IsItemVisible Method

Syntax

[Android.Runtime.Register("isItemVisible", "(I)Z", "GetIsItemVisible_IHandler:ShinobiControls.Android.Grids.Core.IHasGridBehaviorInvoker, ShinobiControls.Android.Grids")]
public bool IsItemVisible (int itemPosition)

Parameters

itemPosition
- the position of the item to check

Returns

true if the item visibility status is currently set to true, otherwise false

Remarks

Returns the visibility status of the item at the given position. By default the visibility status of an item is true

, which means the item can be displayed by the grid. An item with a visibility status set to false

will not be shown on the grid but instead represented by a blank space at the position which was occupied by the item. If no row or column exists in the grid for the given position then this will return false

.

Requirements

Namespace: ShinobiControls.Android.Grids.Core
Assembly: ShinobiControls.Android.Grids (in ShinobiControls.Android.Grids.dll)
Assembly Versions: 1.0.0.0

NotifyRowRangeChanged Method

Syntax

[Android.Runtime.Register("notifyRowRangeChanged", "(II)V", "GetNotifyRowRangeChanged_IIHandler:ShinobiControls.Android.Grids.Core.IHasGridBehaviorInvoker, ShinobiControls.Android.Grids")]
public void NotifyRowRangeChanged (int p0, int p1)

Parameters

p0
Documentation for this section has not yet been entered.
p1
Documentation for this section has not yet been entered.

Remarks

Notify any registered observers that the items on each row within the given range have changed.

Requirements

Namespace: ShinobiControls.Android.Grids.Core
Assembly: ShinobiControls.Android.Grids (in ShinobiControls.Android.Grids.dll)
Assembly Versions: 1.0.0.0

SetItemSelected Method

Syntax

[Android.Runtime.Register("setItemSelected", "(IZ)V", "GetSetItemSelected_IZHandler:ShinobiControls.Android.Grids.Core.IHasGridBehaviorInvoker, ShinobiControls.Android.Grids")]
public void SetItemSelected (int p0, bool p1)

See Also

IHasGridBehavior.IsItemSelected(int)

Parameters

p0
Documentation for this section has not yet been entered.
p1
Documentation for this section has not yet been entered.

Remarks

Sets the selection state of the item at the given position. If no row or column exists in the grid for the given position then this will be ignored.

Requirements

Namespace: ShinobiControls.Android.Grids.Core
Assembly: ShinobiControls.Android.Grids (in ShinobiControls.Android.Grids.dll)
Assembly Versions: 1.0.0.0

SetItemVisible Method

Syntax

[Android.Runtime.Register("setItemVisible", "(IZ)V", "GetSetItemVisible_IZHandler:ShinobiControls.Android.Grids.Core.IHasGridBehaviorInvoker, ShinobiControls.Android.Grids")]
public void SetItemVisible (int p0, bool p1)

See Also

IHasGridBehavior.IsItemVisible(int)

Parameters

p0
Documentation for this section has not yet been entered.
p1
Documentation for this section has not yet been entered.

Remarks

Sets the visibility of the item at the given position. This method is particularly useful if you wish to hide an item on the grid, which is done by passing a false

parameter. In this case the grid will display a blank space at the position which was occupied by the item. More precisely, the item placed here will be one that corresponds to the R.id.sg_hidden_item_view

type registered with the ShinobiControls.Android.Grids.Core.ShinobiGridView

. By default this is a transparent View but it is possible to register a different View to be used for hidden items (see ShinobiGridView.RegisterItemViewHolderCreator(IItemViewHolderCreator)

). If no row or column exists in the grid for this position then this will be ignored.

Requirements

Namespace: ShinobiControls.Android.Grids.Core
Assembly: ShinobiControls.Android.Grids (in ShinobiControls.Android.Grids.dll)
Assembly Versions: 1.0.0.0