Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17076

PageView has problems with Android

$
0
0

@chhengRavy1 wrote:

Hi everyone here!

Today I need your help. In my application, I use PageView and it works fine on Mac and IOS devices but have two problems with android devices.

D/cocos2d-x debug info: JS: assets/src/scene/lessons/pageViewManager.js:67:TypeError: this._pageView.setCustomScrollThreshold is not a function

D/cocos2d-x debug info: JS: assets/src/scene/lessons/pageViewManager.js:186:TypeError: this._pageView.getCurPageIndex is not a function

    this._pageView = new ccui.PageView();
    this._pageView.setContentSize(FRAMESIZE.width, FRAMESIZE.height);
    this._pageView.setPosition(FRAMESIZE.width / 2, FRAMESIZE.height / 2);
    this._pageView.setCustomScrollThreshold(50);
    this._pageView.setAnchorPoint(0.5, 0.5);
    this._pageView.setTouchEnabled(true);
    this._pageView.setPropagateTouchEvents(false);
    this._pageView.addEventListener(function (sender, type) {
        self.onTurningPageEvent(sender, type);
    }, this);
    this.addChild(this._pageView);

///////////////////////////////////////////////////////////

onNextPage: function () {
     console.log("onNextPage1");
      var currentPageIndex = this._pageView.getCurPageIndex();
     console.log("currentPageIndex" + currentPageIndex);
     this._pageView.scrollToPage(currentPageIndex + 1);
},

Thank you before hand.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17076

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>