Skip to content

有一个bug,,默认的cube类型时,从右往左主动切片时会出现多余的图片旋转 #3

@lancewong2014

Description

@lancewong2014

原因是position这个变量的值引起的,修正也很简单:
if(position<=1&&position>=0){
ViewHelper.setPivotX(view, 0);
ViewHelper.setPivotY(view, view.getMeasuredHeight() * 0.5f);
ViewHelper.setRotationY(view, 90f * position);
}else if(position<0&&position>=-1){
ViewHelper.setPivotX(view, view.getMeasuredWidth());
ViewHelper.setPivotY(view, view.getMeasuredHeight() * 0.5f);
//只在Y轴做旋转操作
ViewHelper.setRotationY(view, 90f * position);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions