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

Apps Tabbed surfaceviews - is this possible?

Discussion in 'Android Development' started by ArloUK, Nov 25, 2010.

  1. ArloUK

    ArloUK Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Nov 25, 2010

    Nov 25, 2010
    1
    0
    5
    I have been trying to solve this for a month and wonder if anyone can help (I can post a pile of code if needed but the problem is easier to state).

    I have a main tabactivity class with 2 tabs. Each tab's content is another activity class with a SurfaceView I can draw on to the SurfaceView (eg "hello" on one tab and "world" on the other tab) using the usual getHolder/unlockCanvasAndPost(canvas) method.

    BUT only the tab that initially loads (from setCurrentTab in main class) is ever usable/redrawable.

    The two surfaceviews are one on top of the other and it's as if one masks the other.

    BTW the background color of the tab does change when switching between tabs (for instance if I had red on the "hello" tab and blue on the "goodbye" tab).

    Could anyone point me to a simple working example or explain what's wrong or if I'm trying to do the impossible.
     

    Advertisement

Share This Page

Loading...