Sliding Window

Overview

Sliding Window is a fullscreen window that slides in and out of the screen during pop and unpop events. Use it to create transition effects between screens.

Source Code

package com.totalcross;

import totalcross.ui.Container;
import totalcross.ui.Presenter;
import totalcross.ui.SlidingWindow;

public class MySlidingWindow extends SlidingWindow {

    public MySlidingWindow(boolean delayInitUI, Presenter<Container> provider) {
        super(delayInitUI, provider);
    }

    public MySlidingWindow(Presenter<Container> provider, int animDir,
                                                          int totalTime){
        super(provider);
        this.animDir = animDir; // This can be LEFT or RIGHT, any other will
                                // be BOTTOM
        this.totalTime = totalTime; // Time, in milliseconds for the animation
    }
}

Because it is a more complex example, we only show the specific Sliding Window example code, if you want to see the whole code of the image interface construction click here.

Methods

Last updated