fitnesskim / tree-view-list-android

Automatically exported from code.google.com/p/tree-view-list-android
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

can not do Horizontal Scroll #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
All integration of this code is working so smooth but i have a long branches 
tree which is not fitting on screen. Tree is getting wrapped in multiple row so 
i need to implement a horizontal scroll. Can you tell me how it could be done?

Original issue reported on code.google.com by universe...@gmail.com on 20 Sep 2012 at 7:25

GoogleCodeExporter commented 9 years ago
Honestly if you are having this problem you should rethink your user interface. 
Probably you need completely different navigation paradigm. It will be unusable 
on mobile if you do both up-down and left-right scrolling

Original comment by ja...@potiuk.com on 20 Sep 2012 at 7:30

GoogleCodeExporter commented 9 years ago
thanks for your response, can you give me any idea to resolve this problem? i m 
new in android dev.

Original comment by universe...@gmail.com on 20 Sep 2012 at 7:48

GoogleCodeExporter commented 9 years ago
I don't know you app, but genearally  - never show more than one level of tree 
at a time and navigate using back to higher level. 

Look here: http://developer.android.com/design/style/index.html for design 
patterns that are good for android.

Original comment by ja...@potiuk.com on 20 Sep 2012 at 7:51

GoogleCodeExporter commented 9 years ago
hi,I'm a chinese Android developer,I have some questions
this,how to write like this ,and any else solothions.

<HorizontalScrollView 
        android:layout_width="wrap_content"
        android:layout_height="match_parent">
    <pl.polidea.treeview.TreeViewList
        android:id="@+id/mainTreeView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:scrollbars="vertical|horizontal"
        android:smoothScrollbar="true"
        treeView:indicator_gravity="right|center_vertical" />
    </HorizontalScrollView>

Original comment by Ethan.we...@gmail.com on 10 Apr 2013 at 10:08

GoogleCodeExporter commented 9 years ago
I hava already solved this,write like this ,it will works well.

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

        <FrameLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <com.qt.txl.util.treeview.TreeViewList
                android:id="@+id/treeviewlist_contactactivity"
                android:layout_width="1000dp"
                android:layout_height="wrap_content"
                android:divider="@drawable/divider_dark"
                android:scrollbars="vertical|horizontal"
                android:smoothScrollbar="true"
                app:collapsible="true"
                app:indent_width="30dp"
                app:indicator_gravity="right|center_vertical"
                app:src_collapsed="@drawable/addressbook_contacter_collapsed_gray"
                app:src_expanded="@drawable/addressbook_contacter_expanded_gray" />
        </FrameLayout>
    </HorizontalScrollView>

Original comment by Ethan.we...@gmail.com on 10 Apr 2013 at 10:47

GoogleCodeExporter commented 9 years ago
Or try like this.
http://www.eoeandroid.com/forum.php?mod=viewthread&tid=229028

1、around TreeListView add the HorizontalScrollView
2、set TreeListView's attribute papp:autoAdapt="true"
3、override the Adapter' method
@Override    protected int getLayoutWidth() {
    //return a dynamic width according to the list item width 
}

Original comment by Ethan.we...@gmail.com on 11 Apr 2013 at 12:46