Skip to end of metadata
Go to start of metadata

Represents an Activity<TViewModel> that supports listing and multi-choice support.

Definition

public abstract class ListActivity<TViewModel> : Activity<TViewModel>,

ISupportItemBinding, IListView, IOnRefreshListener, IMultiChoiceModeListener

where TViewModel : IListViewModel, class

Type Parameters

TViewModel Instance of IListViewModel

Summary

The following table summarizes the members exposed in this class.

Protected Constructors

Public Properties

AutoSelectFirstItem Gets the value indicating whether first item should be selected on initial load.
CellTemplateSelector Gets or sets the cell template selector.
ChoiceInputMode Gets the ListActivity<TViewModel>.
EditingOptions Gets the value for ListActivity<TViewModel>.
ImageSettings Gets the image settings.
InteractionMode Gets the ListViewInteraction mode.
ItemBindingAdapters Gets the item binding adapters.
ListView Gets the IListView instance.
SwipeRefreshLayout Gets the swipe refresh layout.

Protected Properties

AnimateOnNewItems Gets the value that determines whether the list view will be animated on addition of new items.
CheckedIcon Get the checked state icon.
ContentLayoutId Gets the content layout identifier to be inflated.
ContextualActionBarSettings Gets the value for ListActivity<TViewModel>.
EmptyListViewLayoutId Gets the empty list view layout identifier.
FastScrollAlwaysVisible Gets the value that determines whether fast scrollbar is always visible.
FastScrollEnabled Gets the value that determines whether the fast scroll feature is enabled.
FastScrollLetters Gets the value that determines the number of letters to show when the fast scroll feature is enabled.
FooterLayoutId Gets the value that determines the ID of the footer layout.
FooterProgressLayoutId Gets the value that determines the layout identifier of the footer progress indicator when there are more items to be displayed.
GroupItemLayoutId Gets the identifier of the group item header.
HeaderLayoutId Gets the value that determines the identifier of the header layout.
HeaderProgressLayoutId Gets the value that determines the layout ID of the header progress indicator when there are more items to be displayed.
ImageLoaderSettings Gets the value that determines the behavior of the async image loader.
ListItemLayoutId Gets the layout identifier of list item.
ListViewId Gets the identifier of the list view.
UncheckedIcon Gets the unchecked state icon.

Public Methods

OnActionItemClicked(ActionMode, IMenuItem) Called when action item is clicked.
OnCreateActionMode(ActionMode, IMenu) Called when contextual action bar is created.
OnDestroyActionMode(ActionMode) Called when contextual action bar is destroyed.
OnItemCheckedStateChanged(ActionMode, int, long, bool) Called when item checked state is changed.
OnPrepareActionMode(ActionMode, IMenu) Called when action bar is prepared.
OnRefresh() Called when pull to refresh is executed.
RegisterItemBindingAdapter<TView, TAdapter>() Registers the item binding adapter for the specified view type.
ScrollToBottom() Scroll the related list view to bottom.
ScrollToPosition(int) Scroll the related list view to specified position.
ScrollToTop() Scroll the related list view to top.
SetAllItemChecked(bool) Sets all item as checked.

Protected Methods

CanRefresh() Check if pull to refresh can be executed.
Initialize() Initialize view context.
InitializeView() Initializes the view-related logic before it is rendered.
InvalidateSwipeRefreshLayout() Call this method to invalidate the state of swipe refresh layout.
OnPostCreate(Bundle) Called when activity start-up is complete.
OnViewCreated() Called when view is created.
OnViewDisposed() Called when the view is disposed.
OnViewModelDisposed() Dispose the view model.
OnViewModelPropertyChanged(PropertyChangedEventArgs) Called when the properties of the associated view model has changed.
SynchronizeCheckedItems() Synchronizes checked items.

Protected Constructors

protected ListActivity()

Initializes the ListActivity<TViewModel> class.

protected ListActivity(TViewModel viewModel)

Initializes the ListActivity<TViewModel> class.

Parameters

viewModel Instance of IListViewModel

protected ListActivity(IntPtr intPtr, JniHandleOwnership jniHandleOwnership)

Initializes a new instance of the ListActivity<TViewModel> class.

Parameters

intPtr The int PTR.
jniHandleOwnership The jni handle ownership.

Public Properties

public bool AutoSelectFirstItem { get; }

Gets the value indicating whether first item should be selected on initial load.

public ViewTemplateSelector CellTemplateSelector { get; set; }

Gets or sets the cell template selector.

public ChoiceInputMode ChoiceInputMode { get; }

Gets the ListActivity<TViewModel>.

public EditingOptions EditingOptions { get; }

Gets the value for ListActivity<TViewModel>.

public ImageSettings ImageSettings { get; }

Gets the image settings.

public ListViewInteraction InteractionMode { get; }

Gets the ListViewInteraction mode.

public Dictionary<Type, IItemBindingAdapter> ItemBindingAdapters { get; }

Gets the item binding adapters.

public ListView ListView { get; }

Gets the IListView instance.

public SwipeRefreshLayout SwipeRefreshLayout { get; }

Gets the swipe refresh layout.

Protected Properties

protected bool AnimateOnNewItems { get; }

Gets the value that determines whether the list view will be animated on addition of new items.

protected int CheckedIcon { get; }

Get the checked state icon.

protected int ContentLayoutId { get; }

Gets the content layout identifier to be inflated.

protected ContextualActionBarSettings ContextualActionBarSettings { get; }

Gets the value for ListActivity<TViewModel>.

protected int EmptyListViewLayoutId { get; }

Gets the empty list view layout identifier.

protected bool FastScrollAlwaysVisible { get; }

Gets the value that determines whether fast scrollbar is always visible.

protected bool FastScrollEnabled { get; }

Gets the value that determines whether the fast scroll feature is enabled.

protected int FastScrollLetters { get; }

Gets the value that determines the number of letters to show when the fast scroll feature is enabled.

protected int FooterLayoutId { get; }

Gets the value that determines the ID of the footer layout.

protected int FooterProgressLayoutId { get; }

Gets the value that determines the layout identifier of the footer progress indicator when there are more items to be displayed.

protected int GroupItemLayoutId { get; }

Gets the identifier of the group item header.

protected int HeaderLayoutId { get; }

Gets the value that determines the identifier of the header layout.

protected int HeaderProgressLayoutId { get; }

Gets the value that determines the layout ID of the header progress indicator when there are more items to be displayed.

protected BasicImageLoaderSettings ImageLoaderSettings { get; }

Gets the value that determines the behavior of the async image loader.

protected int ListItemLayoutId { get; }

Gets the layout identifier of list item.

protected int ListViewId { get; }

Gets the identifier of the list view.

protected int UncheckedIcon { get; }

Gets the unchecked state icon.

Public Methods

public bool OnActionItemClicked(ActionMode mode, IMenuItem menuItem)

Called when action item is clicked.

Parameters

mode The mode.
menuItem The menu item.

public bool OnCreateActionMode(ActionMode mode, IMenu menu)

Called when contextual action bar is created.

Parameters

mode The mode.
menu The menu.

public void OnDestroyActionMode(ActionMode mode)

Called when contextual action bar is destroyed.

Parameters

mode The mode.

public void OnItemCheckedStateChanged(ActionMode mode, int position, long id, bool isChecked)

Called when item checked state is changed.

Parameters

mode The mode.
position The position.
id The identifier.
isChecked if set to true [is checked].

public bool OnPrepareActionMode(ActionMode mode, IMenu menu)

Called when action bar is prepared.

Parameters

mode The mode.
menu The menu.

public void OnRefresh()

Called when pull to refresh is executed.

public void RegisterItemBindingAdapter<TView, TAdapter>()

Registers the item binding adapter for the specified view type.

Type Parameters

TView The view type.
TAdapter The adapter type.

public void ScrollToBottom()

Scroll the related list view to bottom.

public void ScrollToPosition(int position)

Scroll the related list view to specified position.

Parameters

position The position.

public void ScrollToTop()

Scroll the related list view to top.

public void SetAllItemChecked(bool isChecked)

Sets all item as checked.

Parameters

isChecked if set to true [is checked].

Protected Methods

protected bool CanRefresh()

Check if pull to refresh can be executed.

Return Types

A value indicating whether pull to refresh can be executed.

protected void Initialize()

Initialize view context.

protected void InitializeView()

Initializes the view-related logic before it is rendered.

protected void InvalidateSwipeRefreshLayout()

Call this method to invalidate the state of swipe refresh layout.

protected void OnPostCreate(Bundle savedInstanceState)

Called when activity start-up is complete.

Parameters

savedInstanceState The bundle which contains instance state.

protected void OnViewCreated()

Called when view is created.

protected void OnViewDisposed()

Called when the view is disposed.

protected void OnViewModelDisposed()

Dispose the view model.

protected void OnViewModelPropertyChanged(PropertyChangedEventArgs e)

Called when the properties of the associated view model has changed.

Parameters

e The System.ComponentModel.PropertyChangedEventArgs instance containing the event data.

protected void SynchronizeCheckedItems()

Synchronizes checked items.

  • No labels