当前位置: 首页>>代码示例>>Java>>正文


Java AndroidTreeView.expandAll方法代码示例

本文整理汇总了Java中com.unnamed.b.atv.view.AndroidTreeView.expandAll方法的典型用法代码示例。如果您正苦于以下问题:Java AndroidTreeView.expandAll方法的具体用法?Java AndroidTreeView.expandAll怎么用?Java AndroidTreeView.expandAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.unnamed.b.atv.view.AndroidTreeView的用法示例。


在下文中一共展示了AndroidTreeView.expandAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreateView

import com.unnamed.b.atv.view.AndroidTreeView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_selectable_nodes, null, false);
    rootView.findViewById(R.id.status).setVisibility(View.GONE);
    ViewGroup containerView = (ViewGroup) rootView.findViewById(R.id.container);

    TreeNode root = TreeNode.root();

    TreeNode s1 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_folder, "Folder with very long name ")).setViewHolder(new SelectableHeaderHolder(getActivity()));
    TreeNode s2 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_folder, "Another folder with very long name")).setViewHolder(new SelectableHeaderHolder(getActivity()));

    fillFolder(s1);
    fillFolder(s2);

    root.addChildren(s1, s2);

    tView = new AndroidTreeView(getActivity(), root);
    tView.setDefaultAnimation(true);
    tView.setUse2dScroll(true);
    tView.setDefaultContainerStyle(R.style.TreeNodeStyleCustom);
    containerView.addView(tView.getView());

    tView.expandAll();

    if (savedInstanceState != null) {
        String state = savedInstanceState.getString("tState");
        if (!TextUtils.isEmpty(state)) {
            tView.restoreState(state);
        }
    }
    return rootView;
}
 
开发者ID:loput12ouj35,项目名称:Android-MindMap,代码行数:33,代码来源:TwoDScrollingFragment.java

示例2: onCreateView

import com.unnamed.b.atv.view.AndroidTreeView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_selectable_nodes, null, false);
    rootView.findViewById(R.id.status).setVisibility(View.GONE);
    ViewGroup containerView = (ViewGroup) rootView.findViewById(R.id.container);

    TreeNode root = TreeNode.root();

    TreeNode s1 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_folder, "Folder with very long name ")).setViewHolder(
        new ArrowExpandSelectableHeaderHolder(getActivity()));
    TreeNode s2 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_folder, "Another folder with very long name")).setViewHolder(
        new ArrowExpandSelectableHeaderHolder(getActivity()));

    fillFolder(s1);
    fillFolder(s2);

    root.addChildren(s1, s2);

    tView = new AndroidTreeView(getActivity(), root);
    tView.setDefaultAnimation(true);
    tView.setUse2dScroll(true);
    tView.setDefaultContainerStyle(R.style.TreeNodeStyleCustom);
    tView.setDefaultNodeClickListener(TwoDScrollingArrowExpandFragment.this);
    tView.setDefaultViewHolder(ArrowExpandSelectableHeaderHolder.class);
    containerView.addView(tView.getView());
    tView.setUseAutoToggle(false);

    tView.expandAll();

    if (savedInstanceState != null) {
        String state = savedInstanceState.getString("tState");
        if (!TextUtils.isEmpty(state)) {
            tView.restoreState(state);
        }
    }
    return rootView;
}
 
开发者ID:bmelnychuk,项目名称:AndroidTreeView,代码行数:38,代码来源:TwoDScrollingArrowExpandFragment.java


注:本文中的com.unnamed.b.atv.view.AndroidTreeView.expandAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。