I want to implement a custom ViewGroup which looks like 3 horizontal
"train tracks", red, blue and green tracks, parallel to each other.
And each of the tracks can carry one or more "compartments".

Each compartment can be a red, blue or a green compartment, has a
different size and can be positioned anywhere on the corresponding
tracks. Fling on the screen must move the the tracks together either
way. The user should also be able to pinch and zoom on the screen.

TrainTracks extends FrameLayout
{
    HorizontalScrollView holder;
    Vertical_LinearLayout trackHolder;
    Horizontal_LinearLayout red;
    Horizontal_LinearLayout blue;
    Horizontal_LinearLayout green;

    //holder
    //    trackHolder
    //        red, blue and green

    public void addCompartment(int whichTrack, Comparment C);
    {
        //Add C to red, blue or green
    }
    public void addVoid(int whichTrack, int voidLength)
    {
        //Add View object of size voidLength to red, blue or green
    }
}

Compartment extends View
{
}

Does this sound like a good design? Should I checkout using a
SurfaceView especially given that flings and pinch-zoom should be
supported?

Thanks in advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to