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


Java AndroidTreeView.setDefaultNodeLongClickListener方法代码示例

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


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

示例1: showForums

import com.unnamed.b.atv.view.AndroidTreeView; //导入方法依赖的package包/类
@Override
public void showForums(ForumItemTree forumRoot) {
    tView = new AndroidTreeView(getContext());
    root = TreeNode.root();
    recourse(forumRoot, root);
    tView.setRoot(root);

    tView.setDefaultContainerStyle(R.style.TreeNodeStyleCustom);
    tView.setDefaultViewHolder(DefaultForumHolder.class);
    tView.setDefaultNodeClickListener(nodeClickListener);
    tView.setDefaultNodeLongClickListener(nodeLongClickListener);
    treeContainer.removeAllViews();
    treeContainer.addView(tView.getView());

    if (forumId != -1) {
        scrollToForum(forumId);
        forumId = -1;
    }
}
 
开发者ID:RadiationX,项目名称:ForPDA,代码行数:20,代码来源:ForumFragment.java

示例2: onCreate

import com.unnamed.b.atv.view.AndroidTreeView; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_inventory_explorer);


    callback = new PerformOperationCallback();

    setUpBindings();

    setUpToolbar();

    ViewGroup containerView = (ViewGroup) findViewById(R.id.container);

    root = TreeNode.root();

    holder = root.getViewHolder();

    tView = new AndroidTreeView(this, root);
    tView.setDefaultAnimation(true);
    tView.setDefaultContainerStyle(R.style.TreeNodeStyleCustom);
    tView.setDefaultViewHolder(IconTreeItemHolder.class);
    tView.setDefaultNodeClickListener(nodeClickListener);
    tView.setDefaultNodeLongClickListener(nodeLongClickListener);
    containerView.addView(tView.getView());

    BackendClient.of(this).getFeeds(new FeedsCallback());

    //String path = CanonicalPath.getByString("/t;hawkular/f;400e8e5737ca/mt;Runtime%20Availability~VM%20Availability").getMetricType();

    if (savedInstanceState != null) {
        String state = savedInstanceState.getString("tState");
        if (!TextUtils.isEmpty(state)) {
            tView.restoreState(state);
        }
    }

}
 
开发者ID:hawkular,项目名称:hawkular-android-client,代码行数:39,代码来源:InventoryExplorerActivity.java

示例3: 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_default, null, false);
    ViewGroup containerView = (ViewGroup) rootView.findViewById(R.id.container);

    statusBar = (TextView) rootView.findViewById(R.id.status_bar);

    TreeNode root = TreeNode.root();
    TreeNode computerRoot = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_laptop, "My Computer"));

    TreeNode myDocuments = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_folder, "My Documents"));
    TreeNode downloads = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_folder, "Downloads"));
    TreeNode file1 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_drive_file, "Folder 1"));
    TreeNode file2 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_drive_file, "Folder 2"));
    TreeNode file3 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_drive_file, "Folder 3"));
    TreeNode file4 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_drive_file, "Folder 4"));
    fillDownloadsFolder(downloads);
    downloads.addChildren(file1, file2, file3, file4);

    TreeNode myMedia = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_photo_library, "Photos"));
    TreeNode photo1 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_photo, "Folder 1"));
    TreeNode photo2 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_photo, "Folder 2"));
    TreeNode photo3 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_photo, "Folder 3"));
    myMedia.addChildren(photo1, photo2, photo3);

    myDocuments.addChild(downloads);
    computerRoot.addChildren(myDocuments, myMedia);

    root.addChildren(computerRoot);

    tView = new AndroidTreeView(getActivity(), root);
    tView.setDefaultAnimation(true);
    tView.setDefaultContainerStyle(R.style.TreeNodeStyleCustom);
    tView.setDefaultViewHolder(IconTreeItemHolder.class);
    tView.setDefaultNodeClickListener(nodeClickListener);
    tView.setDefaultNodeLongClickListener(nodeLongClickListener);

    containerView.addView(tView.getView());

    if (savedInstanceState != null) {
        String state = savedInstanceState.getString("tState");
        if (!TextUtils.isEmpty(state)) {
            tView.restoreState(state);
        }
    }

    return rootView;
}
 
开发者ID:loput12ouj35,项目名称:Android-MindMap,代码行数:50,代码来源:FolderStructureFragment.java

示例4: onCreate

import com.unnamed.b.atv.view.AndroidTreeView; //导入方法依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mindmapLayout = (RelativeLayout) findViewById(R.id.mindmapLayout);
        mindmapLayout.setX(mindmapLayout.getX() - (1920 - 1080));

        input = (EditText) findViewById(R.id.input);

        TreeNode root = TreeNode.root();
        TreeNode computerRoot = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_cloud, "Happiness"));
        first_root = computerRoot;
        current_root = first_root;

        TreeNode myDocuments = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_folder, "Money"));
        TreeNode downloads = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_folder, "luxury"));
        TreeNode file1 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_drive_file, "gold"));
        TreeNode file2 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_drive_file, "sliver"));
        TreeNode file3 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_drive_file, "gem"));
        TreeNode file4 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_drive_file, "ivory"));
        downloads.addChildren(file1, file2, file3, file4);

        TreeNode myMedia = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_photo_library, "life"));
        TreeNode photo1 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_photo, "health"));
        TreeNode photo2 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_photo, "love"));
        TreeNode photo3 = new TreeNode(new IconTreeItemHolder.IconTreeItem(R.string.ic_photo, "stability"));
        myMedia.addChildren(photo1, photo2, photo3);
        myDocuments.addChild(downloads);
        computerRoot.addChildren(myDocuments, myMedia);

        root.addChildren(computerRoot);

        /////////////////////////////////////////////////////////////////

        tView = new AndroidTreeView(this, root);
        tView.setDefaultAnimation(true);
        tView.setDefaultContainerStyle(R.style.TreeNodeStyleCustom);
        tView.setDefaultViewHolder(IconTreeItemHolder.class);
        tView.setDefaultNodeClickListener(nodeClickListener);
        tView.setDefaultNodeLongClickListener(nodeLongClickListener);

        RelativeLayout containerView = (RelativeLayout) findViewById(R.id.item);
        tView_result = tView.getView();
        containerView.addView(tView_result);
////////////////////////////////////////////////////////////////////////////////////////
        setMView(first_root);
    }
 
开发者ID:loput12ouj35,项目名称:Android-MindMap,代码行数:49,代码来源:MainActivity.java


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