YAACC - UPNP Client and Server
|
Custom RecyclerView.Adapter used to provide a tree view features on any RecyclerView. More...
Classes | |
interface | OnTreeNodeClickListener |
Interface definition for a callback to be invoked when a TreeNode has been clicked and held. More... | |
interface | OnTreeNodeLongClickListener |
Interface definition for a callback to be invoked when a TreeNode has been clicked and held. More... | |
Public Member Functions | |
TreeViewAdapter (TreeViewHolderFactory factory) | |
Simple constructor. | |
TreeViewAdapter (TreeViewHolderFactory factory, TreeNodeManager manager) | |
Constructor used to accept user custom TreeNodeManager class. | |
TreeViewHolder | onCreateViewHolder (@NonNull ViewGroup parent, int layoutId) |
void | onBindViewHolder (@NonNull TreeViewHolder holder, @SuppressLint("RecyclerView") int position) |
int | getItemViewType (int position) |
int | getItemCount () |
void | collapseNode (TreeNode node) |
Collapsing node and all of his children. | |
void | expandNode (TreeNode node) |
Expanding node and all of his children. | |
void | collapseNodeBranch (TreeNode node) |
Collapsing full node branches. | |
void | expandNodeBranch (TreeNode node) |
Expanding node full branches. | |
void | expandNodeToLevel (TreeNode node, int level) |
Expanding one node branch to until specific level. | |
void | expandNodesAtLevel (int level) |
Expanding all tree nodes branches to until specific level. | |
void | collapseAll () |
Collapsing all nodes in the tree with their children. | |
void | expandAll () |
Expanding all nodes in the tree with their children. | |
void | updateTreeNodes (List< TreeNode > treeNodes) |
Update the list of tree nodes. | |
void | clearTreeNodes () |
Delete all tree nodes. | |
void | setTreeNodeClickListener (OnTreeNodeClickListener listener) |
Register a callback to be invoked when this TreeNode is clicked. | |
void | setTreeNodeLongClickListener (OnTreeNodeLongClickListener listener) |
Register a callback to be invoked when this TreeNode is clicked and held. | |
void | setTreeNodes (List< TreeNode > treeNodes) |
Set the current visible tree nodes and notify adapter data. | |
List< TreeNode > | getTreeNodes () |
Get the Current visible Tree nodes. | |
TreeNode | getSelectedNode () |
Custom RecyclerView.Adapter used to provide a tree view features on any RecyclerView.
de.yaacc.upnp.server.TreeViewAdapter.TreeViewAdapter | ( | TreeViewHolderFactory | factory | ) |
Simple constructor.
factory | a View Holder Factory mapped with layout id's |
de.yaacc.upnp.server.TreeViewAdapter.TreeViewAdapter | ( | TreeViewHolderFactory | factory, |
TreeNodeManager | manager | ||
) |
Constructor used to accept user custom TreeNodeManager class.
factory | a View Holder Factory mapped with layout id's |
manager | a custom tree node manager class |
void de.yaacc.upnp.server.TreeViewAdapter.collapseNode | ( | TreeNode | node | ) |
Collapsing node and all of his children.
node | The node to collapse it |
void de.yaacc.upnp.server.TreeViewAdapter.collapseNodeBranch | ( | TreeNode | node | ) |
Collapsing full node branches.
node | The node to collapse it |
void de.yaacc.upnp.server.TreeViewAdapter.expandNode | ( | TreeNode | node | ) |
Expanding node and all of his children.
node | The node to expand it |
void de.yaacc.upnp.server.TreeViewAdapter.expandNodeBranch | ( | TreeNode | node | ) |
Expanding node full branches.
node | The node to expand it |
void de.yaacc.upnp.server.TreeViewAdapter.expandNodesAtLevel | ( | int | level | ) |
Expanding all tree nodes branches to until specific level.
level | to expand all nodes branches to it |
void de.yaacc.upnp.server.TreeViewAdapter.expandNodeToLevel | ( | TreeNode | node, |
int | level | ||
) |
Expanding one node branch to until specific level.
node | to expand branch of it until level |
level | to expand node branches to it |
TreeNode de.yaacc.upnp.server.TreeViewAdapter.getSelectedNode | ( | ) |
List< TreeNode > de.yaacc.upnp.server.TreeViewAdapter.getTreeNodes | ( | ) |
Get the Current visible Tree nodes.
void de.yaacc.upnp.server.TreeViewAdapter.setTreeNodeClickListener | ( | OnTreeNodeClickListener | listener | ) |
Register a callback to be invoked when this TreeNode is clicked.
listener | The callback that will run |
void de.yaacc.upnp.server.TreeViewAdapter.setTreeNodeLongClickListener | ( | OnTreeNodeLongClickListener | listener | ) |
Register a callback to be invoked when this TreeNode is clicked and held.
listener | The callback that will run |
void de.yaacc.upnp.server.TreeViewAdapter.setTreeNodes | ( | List< TreeNode > | treeNodes | ) |
Set the current visible tree nodes and notify adapter data.
treeNodes | New tree nodes |
void de.yaacc.upnp.server.TreeViewAdapter.updateTreeNodes | ( | List< TreeNode > | treeNodes | ) |
Update the list of tree nodes.
treeNodes | The new tree nodes |