Appcelerator を使用して Android 環境でビューをドラッグしようとしていますが、アニメーションが非常に不安定であることが判明しました。コードは以下のとおりです。
newmainwindow.addEventListener('touchstart', function(e){
xPos = e.x;
yPos = e.y;
});
newmainwindow.addEventListener('touchmove', function(e){
var conPoint = newmainwindow.convertPointToView({x:e.x, y:e.y}, mainview);
console.log("global y: " + conPoint.y);
var moveY = conPoint.y - yPos;
moveY /= 2;
console.log("global diff y: " + moveY);
newmainwindow.top = Math.abs(moveY);
});
newmainwindow.addEventListener('touchend', function(e){
console.log("end");
});
私は多くの解決策を探しましたが、残念ながらどれもうまくいきません。どんな助けでも大歓迎です:)