• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Custom component : 2d Grid with 3 scrollviews

odissey

Lurker
Hello everyone,

first of all, my english is bad. I'm french.
Let me introduce my problem : I want to create a widget, that will look like a bi-dimensionnal table. With x and y.

Please look at the following schema describing the behaviour I expect :
http://i52.tinypic.com/2q2mj34.jpg

Why will I use 3 scrollviews instead of a single TableLayout ? Because I want this table to be resizable. Then all the scrollviews should be synchronized, when scrolling x represented by ScrollView 1 (horizontally), the canvas scrolls in X. The same when scrolling in y for ScrollView2.

How am I supposed to build the widget? I choosed to extend RelativeLayout for the main Class. I want the data that will be displayed by the widget to be refreshable. This data will be :
- X Labels
- Y Labels
- and Tracks (for coloured things in the grid)

Should I use an adapter? How am I supposed to do ?

Thank you very much for all your contributions, even the shortest.
Regards,
C.O.
 
I've progressed a bit on the subject. I will not use LinearLayout for my axis scrollviews because of the troubles I may encouter to align my rows and columns on the scrollviews.

I've got an other question : When I resize the whole widget, what can I do to adjust my scrollview sizes to fit to the layout measures?

Thank you so much for replying.
 
Back
Top Bottom