Giter Site home page Giter Site logo

tree-view-list-android's Introduction

Introduction

This is a small widget that provides quite configurable tree view list. It is based on standard android list view.

Note that using generic tree is probably not the best approach for Android (or any other mobile) UI. See http://developer.android.com/design/index.html for all the control that it makes sense to use. Thus tree view should be considered as deprecated.

The widget is fully configurable - with your custom adapter you can provide your own implementation of the item views - even completely different implementation of item views depending on the tree level you are at. Implementation follows best approach of Adapters from android so views at the same tree level are reusable.

Usage

The whole project can be included as external android library. After unsetting the "isLibrary?" flag, the project can also be compiled and installed on its own - providing demo application that presents capability of the widget. It shows how the tree behaves dynamically including explanding and collapsing nodes for many/all node, providing context menu for the tree, custom tree view with checkboxes only available for leaf nodes, custom colouring and different text sizes for text for different levels of the tree (albeit ugly) of the tree. The activity handling it is TreeViewListDemo.java, adapters used are SimpleStandardAdapter.java and extending it, colorful FancyColouredVariousSizesAdapter.java. Layout for tree items is defined in demo_list_item.xml. You can learn from the demo how to use the widget. The tree can be configured through XML layout file (attributes are defined in attrs.xml ).

tree-view-list-android's People

Contributors

gkapusta avatar potiuk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tree-view-list-android's Issues

Maven central

Hello.
Do you plan to share library as maven artifact?
Regards.

NoClassDefFoundError when building demo app with Eclipse

Steps to reproduce:

  • Use Eclipse Luna with ADT 23.0.6
  • Open a new workspace
  • Import the project as "Android Project from Existing Code"
  • Run it as an Android Application

The app will build and launch, but immediately crash with a NoClassDefFoundError.

I have encountered this before in a different project, where changing the Java compiler compliance level from 1.6 to 1.7 solved it. The same approach works here, but requires targeting Android 4.4 (API 19), else the toolchain will complain.

Steps in detail:

  • Go to Project Properties
  • In Android, choose Android 4.4.2 (API 19) as the build target.
  • In Java Compiler, set the compiler compliance level to 1.7.

With these, I was able to build and run the demo app.

treeview inside horizontalScrollView not working !!

Hi,

Thanks for your great work on tree view.

I tried putting treeview inside HorizontalScrollView as I want the complete listview to scroll horizontally if the row item size is greater than parent view size. But its not scrolling. Somehow width of treeview is reduced. I have no idea why.

I tried putting simple listview inside horizontalScrollView and it worked out of box with desired result!

xml for reference :

<HorizontalScrollView   
    android:layout_height="fill_parent" 
    android:layout_width="fill_parent">

     <com.efi.selfserve.treeview.TreeViewList

       android:background="#333333"
       android:layout_marginBottom="50dp"
       android:layout_height="fill_parent" 
       android:layout_width="match_parent"
       android:id="@+id/mainTreeView" 
       treeView:indicator_gravity="right|center_vertical"
    android:listSelector="@drawable/list_selector_background"          
   />

    </HorizontalScrollView>

Thanks,

GraphView Height

This libraray is good i have used this and also custmize this according to requirement but the one thing that i am unable to correct is height of graph view. I want to show this graph view in dialogFragment and the height of fragment is wrapContent and height of graphView is also wrap content but it is still showimg on full screen. Any idea how can i reduce its height or how can i correct its height according to my graph.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.