/MultiLevelMenu

Multi-Level Menu 多级菜单

Primary LanguageJavaApache License 2.0Apache-2.0

API license Build Status

MultiLevelMenu

Multi-Level Menu 多级菜单

最开始学习到的Android多级树形选择列表案例 - 手把手教你快速实现

了解了这个更快实现Android多级树形选择列表

使用DialogPlus

使用

初始化该树形多级菜单 第一个参数 ListView, 第二个参数 上下文,第三个参数 数据集, 第四个参数 默认展开层级数 0为不展开,第五个参数 展开的图标,第六个参数 闭合的图标

mDialogAdapter = new DialogAdapter(listView, DialogActivity.this, mTreeDatas, 0, R.mipmap.tree_ex, R.mipmap.tree_ec);

添加节点数据

mTreeDatas.add(new Node("id", "parentId",new bean()));

绑定数据

listView.setAdapter(mDialogAdapter);//绑定适配器

全选所有节点

mAdapter.setAllNodesSelected(true);

TODO

添加全选或者非全选 为每个节点添加计数 扩展样式

License

Copyright 2017 Kong Jing

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.