Android Coverflow issue on 4.0.3 Samsung Galaxy S2

前端 未结 3 448
别那么骄傲
别那么骄傲 2021-02-04 19:16

I\'m using android coverflow, and it works fine on most of devices, but it seems that in Android 4.0.3 it does not put the center image back to the center once that you slide ba

3条回答
  •  遥遥无期
    2021-02-04 19:54

    I just added

    child.invalidate() 
    

    before

    final int childCenter = getCenterOfView(child); in getChildStaticTransformation(View child, Transformation t) 
    

    so it becomes

    protected boolean getChildStaticTransformation(View child, Transformation t) {
    
        child.invalidate();
        final int childCenter = getCenterOfView(child);
        final int childWidth = child.getWidth();
        int rotationAngle = 0;
    

提交回复
热议问题