ShinobiControls Xamarin Bindings Documentation

ShinobiControls.Android.Grids : ShinobiControls.Android.Grids.Supplement Namespace

RowColumnReorderManager Class

A convenience class responsible for interpreting user long press and drag gestures on a given ShinobiControls.Android.Grids.Core.GridRecyclerView component of a ShinobiControls.Android.Grids.Core.ShinobiGridView into reorder events of optionally, rows and columns.

Syntax

[Android.Runtime.Register("com/shinobicontrols/grids/supplement/RowColumnReorderManager", DoNotGenerateAcw=true)]
public sealed class RowColumnReorderManager : Java.Lang.Object, Android.Support.V7.Widget.RecyclerView.IOnItemTouchListener, IDisposable

Remarks

A convenience class responsible for interpreting user long press and drag gestures on a given ShinobiControls.Android.Grids.Core.GridRecyclerView component of a ShinobiControls.Android.Grids.Core.ShinobiGridView into reorder events of optionally, rows and columns.

The ShinobiControls.Android.Grids.Supplement.RowColumnReorderManager provides visual feedback of the reorder event, pulling the row or column out of the grid and moving it in-sync with the user's finger. When the user lifts their finger from the screen the row or column is put back into the grid. For column reordering, the columns will be re-arranged inline with where the column was placed. For row reordering, it is up to the ShinobiControls.Android.Grids.Supplement.RowReorderDetector.IOnRowReorderListener passed into the constructor to perform any updating of the backing data store for the grid. Additionally, the selection state and visibility state of items within the grid will automatically be preserved across reorder events

The ShinobiControls.Android.Grids.Supplement.RowColumnReorderManager restricts row reordering to being performed on the data items of the ShinobiControls.Android.Grids.Core.ShinobiGridView and restricts column reordering to being performed on the header items of the ShinobiControls.Android.Grids.Core.ShinobiGridView. As such, if the ShinobiControls.Android.Grids.Core.ShinobiGridView does not have a header row (because none of the ShinobiControls.Android.Grids.Core.Columns have a header) it will not be possible to reorder the columns.

The ShinobiControls.Android.Grids.Supplement.RowColumnReorderManager is an and so is added directly to the header and data ShinobiControls.Android.Grids.Core.GridRecyclerViews of the ShinobiControls.Android.Grids.Core.ShinobiGridView. Therefore, there are three steps necessary to enable row and column reordering on your ShinobiControls.Android.Grids.Core.ShinobiGridView:

For example:

You can additionally allow and disallow row or column reordering by using the RowColumnReorderManager.SetShouldManageRowReorder(bool) and RowColumnReorderManager.SetShouldManageColumnReorder(bool) methods. If you wish to change the way items are searched for when the initial long press is made and when the user lifts their finger you can set a ShinobiControls.Android.Grids.Supplement.IChildViewFinder using the RowColumnReorderManager.SetChildViewFinder(IChildViewFinder) method. By default, a ShinobiControls.Android.Grids.Supplement.NearestInTouchBoundsChildViewFinder is used.

The ShinobiControls.Android.Grids.Supplement.RowColumnReorderManager makes use of a number of different components within the library in order to provide a simple way to add visual row and column reordering to your grid. These are listed below. If you require greater control and flexibility you can piece together the various components yourself, adding in your own customisations. This will of course require some extra work.

Requirements

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

Members

See Also: Inherited members from Java.Lang.Object.

Public Constructors

Protected Properties

[read-only]
override
ThresholdClass IntPtr . This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdType Type . This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Member Details

RowColumnReorderManager Constructor

Documentation for this section has not yet been entered.

Syntax

[Android.Runtime.Register(".ctor", "(Lcom/shinobicontrols/grids/core/ShinobiGridView;Lcom/shinobicontrols/grids/supplement/RowReorderDetector$OnRowReorderListener;)V", "")]
public RowColumnReorderManager (ShinobiControls.Android.Grids.Core.ShinobiGridView p0, RowReorderDetector.IOnRowReorderListener p1)

Parameters

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

Remarks

Documentation for this section has not yet been entered.

Requirements

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

OnInterceptTouchEvent Method

Syntax

[Android.Runtime.Register("onInterceptTouchEvent", "(Landroid/support/v7/widget/RecyclerView;Landroid/view/MotionEvent;)Z", "")]
public bool OnInterceptTouchEvent (Android.Support.V7.Widget.RecyclerView p0, Android.Views.MotionEvent p1)

Parameters

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

Returns

Remarks

Requirements

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

OnRequestDisallowInterceptTouchEvent Method

Syntax

[Android.Runtime.Register("onRequestDisallowInterceptTouchEvent", "(Z)V", "")]
public void OnRequestDisallowInterceptTouchEvent (bool disallowIntercept)

Parameters

disallowIntercept
Documentation for this section has not yet been entered.

Remarks

Requirements

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

OnTouchEvent Method

Syntax

[Android.Runtime.Register("onTouchEvent", "(Landroid/support/v7/widget/RecyclerView;Landroid/view/MotionEvent;)V", "")]
public void OnTouchEvent (Android.Support.V7.Widget.RecyclerView p0, Android.Views.MotionEvent p1)

Parameters

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

Remarks

Requirements

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

SetChildViewFinder Method

Syntax

[Android.Runtime.Register("setChildViewFinder", "(Lcom/shinobicontrols/grids/supplement/ChildViewFinder;)V", "")]
public void SetChildViewFinder (IChildViewFinder childViewFinder)

Parameters

childViewFinder
- the ShinobiControls.Android.Grids.Supplement.IChildViewFinder to set, if this parameter is null an will be thrown

Remarks

Sets the ShinobiControls.Android.Grids.Supplement.IChildViewFinder

which will be used to determine how a child view is searched for, during a user gesture. This cannot be null

.

By default this ShinobiControls.Android.Grids.Supplement.RowColumnReorderManager

uses a ShinobiControls.Android.Grids.Supplement.NearestInTouchBoundsChildViewFinder

.

Requirements

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

SetShouldManageColumnReorder Method

Syntax

[Android.Runtime.Register("setShouldManageColumnReorder", "(Z)V", "")]
public void SetShouldManageColumnReorder (bool shouldManageColumnReorder)

Parameters

shouldManageColumnReorder
- set to false this ShinobiControls.Android.Grids.Supplement.RowColumnReorderManager should not react to column reorder gestures. This is set to true by default.

Remarks

Sets if this ShinobiControls.Android.Grids.Supplement.RowColumnReorderManager

should react to column reorder gestures. This is set to true by default.

Requirements

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

SetShouldManageRowReorder Method

Syntax

[Android.Runtime.Register("setShouldManageRowReorder", "(Z)V", "")]
public void SetShouldManageRowReorder (bool shouldManageRowReorder)

Parameters

shouldManageRowReorder
- set to false this ShinobiControls.Android.Grids.Supplement.RowColumnReorderManager should not react to row reorder gestures. This is set to true by default.

Remarks

Sets if this ShinobiControls.Android.Grids.Supplement.RowColumnReorderManager

should react to row reorder gestures. This is set to true by default.

Requirements

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

ThresholdClass Property

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Syntax

protected override IntPtr ThresholdClass { get; }

Value

A IntPtr which contains the java.lang.Class JNI value corresponding to this type.

Remarks

This property is used to control which jclass is provided to methods like Android.Runtime.JNIEnv.CallNonVirtualVoidMethod.

Requirements

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

ThresholdType Property

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Syntax

protected override Type ThresholdType { get; }

Value

A Type which provides the declaring type.

Remarks

This property is used to control virtual vs. non virtual method dispatch against the underlying JNI object. When this property is equal to the declaring type, then virtual method invocation against the JNI object is performed; otherwise, we assume that the method was overridden by a derived type, and perform non-virtual methdo invocation.

Requirements

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