NodeFlow is a library that makes visualizing hierarchical content easier.

Related tags

Layout NodeFlow
Overview

Download Android Arsenal

NodeFlow

NodeFlow is an Android library that provides a simple way to visualize hierarchical content. Perfect for displaying items that are organized in categories / subcategories.

alt tag

#Requirements Android 4.0+ (Ice Cream Sandwich and later)

#Using NodeFlow

###Step 1 Add the following line to the dependencies section of your build.gradle file

compile 'com.telenav.nodeflow:nodeflow:0.1.2'

###Step 2 Extend NodeFlowLayout class and implement abstract methods

public class MyFlow extends NodeFlowLayout {

...

    //define root node and populate it with data
    Node<String> root = Node.get("root").addChildren(Arrays.asList("child1", "child2", "child3"));

    @Override
    protected Node<?> getRootNode() {
        return root;
    }

    @Override
    protected View getContentView(Node<?> node) {
        //inflate view
        ViewGroup v = (ViewGroup) LayoutInflater.from(getContext()).inflate(R.layout.content, this, false);
        //populate with content
        ((TextView) v.findViewById(R.id.content_title)).setText(node.getData());
        return v;
    }

    @Override
    protected View getHeaderView(Node<?> node) {
        //inflate view
        ViewGroup v = (ViewGroup) LayoutInflater.from(getContext()).inflate(R.layout.header, this, false);
        //populate with content
        ((TextView) v.findViewById(R.id.list_item_text)).setText(node.getData());
        return v;
    }
}

###Step 3 Add extended view to a layout

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.yourpackage.MyFlow
        android:id="@+id/nodeFlow"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>
</RelativeLayout>

###Step 4 (Optional) Set node change listener & animation duration

 MyFlow nodeFlow = ((MyFlow) findViewById(R.id.nodeFlow));
 nodeFlow.setNodeChangeListener(new OnActiveNodeChangeListener() {...});
 nodeFlow.setAnimationDuration(500);

#Sample For a more detailed example check the demoapp module.

#License Apache License, Version 2.0

You might also like...
A floating menu library for Android.
A floating menu library for Android.

Hover Hover is a floating menu implementation for Android. Goals The goals of Hover are to: Provide an easy-to-use, out-of-the-box floating menu imple

Simple android library to present an animated ferris wheel
Simple android library to present an animated ferris wheel

Ferris Wheel View Overview An Android Library used to implement an animated Ferris Wheel in android. API SDK 15+ Written in Kotlin Supports landscape

Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube New graphic component.
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube New graphic component.

Please switch to DragView, for the best support, thank you DraggablePanel Download allprojects { repositories { ... maven { url 'https://jitp

Android Library that lights items for tutorials or walk-throughs etc...
Android Library that lights items for tutorials or walk-throughs etc...

Spotlight Gradle dependencies { implementation 'com.github.takusemba:spotlight:x.x.x' } Usage val spotlight = Spotlight.Builder(this) .setTarg

It's an Android library that allows you to use Layout as RadioButton or CheckBox.
It's an Android library that allows you to use Layout as RadioButton or CheckBox.

Android - CompoundLayout It's an Android library that allows you to use Layout as RadioButton or CheckBox. The librarie is Android 14+ compatible. Gra

A library for showing different types of layouts when a list view is empty
A library for showing different types of layouts when a list view is empty

Android Empty Layout Please note that this project is not being maintained now. Hopefully a new version will be available soon. A library for showing

An Android library that help you to build app with swipe back gesture.
An Android library that help you to build app with swipe back gesture.

SwipeBackLayout An Android library that help you to build app with swipe back gesture. Demo Apk GooglePlay Requirement The latest android-support-v4.j

This is a specified proportion to the size of the Layout or View support library, with which you can easily set a fixed ratio of the size of the Layout or View, internal adaptive size calculation, completely abandon the code to calculate the size! If you have any questions in the course or suggestions, please send an e-mail to the following e-mail, thank you! A simple customised version of the TextInputLayout from the Android Design Support Library ⌨️
A simple customised version of the TextInputLayout from the Android Design Support Library ⌨️

Buffer Text Input Layout (Coming to maven central soon!) This is a simple customisation of the TextInputLayout found in the Design Support Library. Wh

Comments
  • Can not build project from console

    Can not build project from console

    I've got the following error during gradlew build:

    Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
    

    It looks like a gradle wrapper directory is missed in git repository.

    opened by vbauer 0
Owner
Telenav Inc
Telenav Inc
Implementation of ExpandableListview with custom header and custom content.

ExpandableLayout ExpandableLayout provides an easy way to create a view called header with an expandable view. Both view are external layout to allow

Robin Chutaux 1.6k Dec 12, 2022
Linear layout, that wrap its content to the next line if there is no space in the current line.

Android flow layout Introduction Extended linear layout that wrap its content when there is no place in the current line. [] (https://travis-ci.org/Ap

Artem.Votincev 2k Jan 5, 2023
:octocat: 📃 FoldingCell is a material design expanding content cell inspired by folding paper material made by @Ramotion

FOLDING CELL [JAVA] Expanding content cell with animation inspired by folding paper card material design. We specialize in the designing and coding of

Ramotion 4.9k Dec 7, 2022
An Android library that help you to build app with swipe back gesture.

SwipeBackLayout An Android library that help you to build app with swipe back gesture. Demo Apk GooglePlay Requirement The latest android-support-v4.j

ike_w0ng 6.1k Dec 29, 2022
A library that easily allows you to mask layouts/viewgroups

Maskable Layout Overview ======================= The Maskable Layout is a simple framelayout that allows you to easily mask views and viewgroups. You

Christophe Smet 654 Dec 2, 2022
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.

Draggable Panel DEPRECATED. This project is not maintained anymore. Draggable Panel is an Android library created to build a draggable user interface

Pedro Vicente Gómez Sánchez 3k Jan 5, 2023
SwipeBack is an android library that can finish a activity by using gesture.

SwipeBack SwipeBack is a android library that can finish a activity by using gesture. You can set the swipe direction,such as left,top,right and botto

Eric 1.7k Nov 21, 2022
A very simple arc layout library for Android

ArcLayout A very simple arc layout library for Android. Try out the sample application on the Play Store. Usage (For a working implementation of this

ogaclejapan 1.4k Dec 26, 2022
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.

Note: we are not actively responding to issues right now. If you find a bug, please submit a PR. Android Sliding Up Panel This library provides a simp

Umano: News Read To You 9.4k Dec 31, 2022