How to create a Next Page Button in Android mode

edited October 2013 in Android Mode

Hello Please i need help..I am building a typical application which has multiple pages ,but i cant seem to move from one page to the other.i will be enormously grateful if anyone could explain the code snippet to me...i am trying to code something like a hyperlink . Cheers

Tagged:

Answers

  • edited October 2013

    What do you have so far? Is the button example not sufficient for your needs? (Of course, you will have to change the functionality slightly to remove the roll-over effect for a touch-screen device...)

  • edited October 2013

    @calsign is there a method like clearScreen() to clean every thing from the screen and start the drawings for the next page?.I tried using background inside mousePressed() for specific coordinates of mouseX and mouseY to sort of create the Next Page button but it doesn't work

    in the example below ,assuming a single tap is the button and the next page is supposed to have just a rectangle drawn without the "home picture"..It does not display just the rectangle onTap.

    import ketai.ui.*; import android.view.MotionEvent;

    KetaiGesture gesture; PImage home;

    void setup() { gesture = new KetaiGesture(this); // sensor.start();

    home = loadImage("home.jpg"); }

    void draw() { background(255,255,255); image(home,width/3.5,height/3); }

    void onTaP(float x ,float y) { background(0,0,200);

    fill(0,255,0); rect( 0,0,width/2,width/2);

    }

  • Answer ✓

    you should implement a state machine. Create a name tab specifically called "States.java". Im sure you can find documentation how to implement a finite state machine in java.

  • Answer ✓

    Squire already got this past post below:
    http://forum.processing.org/two/discussion/558/creating-a-next-page-button

    Although he was asking about regular Processing; not Android. (%)

Sign In or Register to comment.