1. Download our Official Android App: Forums for Android!

Apps Custom component : 2d Grid with 3 scrollviews

Discussion in 'Android Development' started by odissey, Apr 13, 2011.

  1. odissey

    odissey Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    3
    Joined:
    Apr 13, 2011

    Apr 13, 2011
    3
    0
    5
    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.
     

    Advertisement

  2. odissey

    odissey Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    3
    Joined:
    Apr 13, 2011

    Apr 13, 2011
    3
    0
    5
    Do not hesitate to tell me if anything is not clear to you in my explanation.
     
  3. odissey

    odissey Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    3
    Joined:
    Apr 13, 2011

    Apr 13, 2011
    3
    0
    5
    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.
     

Share This Page

Loading...