LinearLayout$LayoutParams cannot be cast to android.widget.FrameLayout$LayoutParams

前端 未结 5 1046
清酒与你
清酒与你 2021-02-01 12:46

Explanation and solution at the bottom.

I am developing one slider layout animation, the animation work fine but when all processes end, they get next E

5条回答
  •  囚心锁ツ
    2021-02-01 12:58

    Try this:

      LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(this.mainview.getWidth(),       this.mainview.getHeight());
      params.setMargins(left, top, right, bottom);
      this.mainview.setLayoutParams(params);
    

    This may be help.

提交回复
热议问题