Complete
over 5 years ago

WERETECH-8515, VVA4-4657

This is fixed as of the 4.50 firmware release for vivoactive 4.

latest fw update on VA4 killed behaviorDelegate

My app NASA PoD was working just fine on a number of devices and in the simulator.  I just updated my VA4 firmware (4.00, GPS 2.7) and the widget no longer scrolls within the text display using behaviorDelegate.  I tried a few things and it still does not work on the actual device.

class TextViewDelegate extends Ui.BehaviorDelegate {
    var isTouchScreen;

    function initialize() {
        BehaviorDelegate.initialize();
        isTouchScreen=Sys.getDeviceSettings().isTouchScreen;
        isTouchScreen=false; //override in attempt to fix VA4 bug
    }

    function onBack() {
        //Sys.println("onBack");
        Ui.popView(Ui.SLIDE_IMMEDIATE);
        return true;
    }

    function onNextMode() {
        //Sys.println("nextMode");
        return onNextPage();
    }
    
    function onNextPage() { // scroll down
        //Sys.println("next");
        if(!isTouchScreen) { 
            scroll(:UP);
            return true;
        }
        return false;
    }

    function onPreviousMode() {
        return onPreviousPage();
    }

    function onPreviousPage() { //scroll up
        //Sys.println("prev");
        if(!isTouchScreen) {
            scroll(:DOWN);
            return true;
        }
        return false;
    }

    function onSwipe(evt) {
        var dir=evt.getDirection();
        //Sys.println("swipe: "+dir);
        if(dir == Ui.SWIPE_UP) {
            scroll(:UP); 
            return true;
        }
        if(dir == Ui.SWIPE_DOWN) {
            scroll(:DOWN);
            return true;
        }
        return false;
    }

    function onHold(evt) {
        var coor = evt.getCoordinates();
        //Sys.println("onHold"+coor[0]+", "+coor[1]);
        return false;
    }
}

Parents Comment Children
No Data