Class TreeViewAdapter
Represents a class to create a view for TreeViewItem.
Inheritance
Namespace: Syncfusion.Android.TreeView
Assembly: Syncfusion.SfTreeView.Android.dll
Syntax
public class TreeViewAdapter : RecyclerView.Adapter
Constructors
TreeViewAdapter()
Initializes a new instance of the TreeViewAdapter class.
Declaration
public TreeViewAdapter()
Properties
ItemCount
Gets the items count of the TreeViewAdapter.
Declaration
public override int ItemCount { get; }
Property Value
Type |
---|
System.Int32 |
TreeView
Gets the SfTreeView.
Declaration
public SfTreeView TreeView { get; }
Property Value
Type |
---|
SfTreeView |
Methods
CreateContentView(TreeViewItemInfoBase)
Gets the Content View in the TreeViewItem.
Declaration
protected virtual View CreateContentView(TreeViewItemInfoBase itemInfo)
Parameters
Type | Name | Description |
---|---|---|
TreeViewItemInfoBase | itemInfo | Represents the TreeViewItemInfoBase. |
Returns
Type | Description |
---|---|
Android.Views.View | Returns the content view. |
Remarks
By default, a label is loaded in the content view.
CreateExpanderView(TreeViewItemInfoBase)
Gets the Expander View in the TreeViewItem.
Declaration
protected virtual View CreateExpanderView(TreeViewItemInfoBase itemInfo)
Parameters
Type | Name | Description |
---|---|---|
TreeViewItemInfoBase | itemInfo | Represents the TreeViewItemInfoBase. |
Returns
Type | Description |
---|---|
Android.Views.View | Returns the expander view. |
Remarks
By default, the expandable icon is loaded in the expander view.
Dispose(Boolean)
Dispose all the allocated resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Represents the boolean value to dispose the resources. |
OnBindViewHolder(RecyclerView.ViewHolder, Int32)
Updates the AndroidX.RecyclerView.Widget.RecyclerView.ViewHolder contents with the item at the given position .
Declaration
public override void OnBindViewHolder(RecyclerView.ViewHolder itemView, int position)
Parameters
Type | Name | Description |
---|---|---|
AndroidX.RecyclerView.Widget.RecyclerView.ViewHolder | itemView | It represents the AndroidX.RecyclerView.Widget.RecyclerView.ViewHolder of the item. |
System.Int32 | position | It represents the position of the holder. |
OnCreateViewHolder(ViewGroup, Int32)
Creates a new AndroidX.RecyclerView.Widget.RecyclerView.ViewHolder to represent the TreeViewItem.
Declaration
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup treeViewItem, int viewType)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.ViewGroup | treeViewItem | Represents the Syncfusion.Android.TreeView.TreeViewItemInfoBase.ViewHolder. |
System.Int32 | viewType | Represents the view type of the item. |
Returns
Type | Description |
---|---|
AndroidX.RecyclerView.Widget.RecyclerView.ViewHolder | Returns the AndroidX.RecyclerView.Widget.RecyclerView.ViewHolder. |
UpdateContentView(View, TreeViewItemInfoBase)
Updates the data associated to the Content View based on the specified TreeViewNode.
Declaration
protected virtual void UpdateContentView(View view, TreeViewItemInfoBase itemInfo)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.View | view | Represents the content view. |
TreeViewItemInfoBase | itemInfo | Represents the TreeViewItemInfoBase. |
UpdateExpanderView(View, TreeViewItemInfoBase)
Updates the data associated to the Expanded View based on the specified TreeViewNode.
Declaration
protected virtual void UpdateExpanderView(View view, TreeViewItemInfoBase itemInfo)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.View | view | Represents the expander view. |
TreeViewItemInfoBase | itemInfo | Represents the TreeViewItemInfoBase. |