多次点击android版本出现棒棒糖,android – 为前棒棒糖设备创建循环显示

首先,这是与

Create circular reveal for pre-Lollipop devices (Android)不同的问题

我正在使用那里提到的库来创建Circular Reveal,但它似乎对我不起作用.

XML

android:layout_width="match_parent"

android:layout_height="match_parent">

android:id="@+id/circBack"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:background="#ff4081"

android:visibility="invisible"

>

JAVA

View myView = findViewById(R.id.circBack);

// get the center for the clipping circle

int cx = (myView.getLeft() + myView.getRight()) / 2;

int cy = (myView.getTop() + myView.getBottom()) / 2;

// get the final radius for the clipping circle

int finalRadius = Math.max(myView.getWidth(), myView.getHeight());

SupportAnimator animator = ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);

animator.setInterpolator(new AccelerateDecelerateInterpolator());

animator.setDuration(1000);

myView.setVisibility(View.VISIBLE);

animator.start();

圆形揭示没有显示出来.我的意思是代码执行时没有任何反应.

Logcat显示了这一点

07-01 19:15:47.498 27556-27556/com.ledo.ledoapp I/art﹕ Rejecting re-init on previously-failed class java.lang.Class

07-01 19:15:47.498 27556-27556/com.ledo.ledoapp I/art﹕ Rejecting re-init on previously-failed class java.lang.Class

07-01 19:15:47.498 27556-27556/com.ledo.ledoapp I/art﹕ Rejecting re-init on previously-failed class java.lang.Class

07-01 19:15:47.501 27556-27556/com.ledo.ledoapp I/art﹕ Rejecting re-init on previously-failed class java.lang.Class

07-01 19:15:47.501 27556-27556/com.ledo.ledoapp I/art﹕ Rejecting re-init on previously-failed class java.lang.Class

07-01 19:15:47.502 27556-27556/com.ledo.ledoapp I/art﹕ Rejecting re-init on previously-failed class java.lang.Class

07-01 19:15:47.502 27556-27556/com.ledo.ledoapp I/art﹕ Rejecting re-init on previously-failed class java.lang.Class

07-01 19:15:47.502 27556-27556/com.ledo.ledoapp I/art﹕ Rejecting re-init on previously-failed class java.lang.Class

07-01 19:15:47.503 27556-27556/com.ledo.ledoapp I/art﹕ Rejecting re-init on previously-failed class java.lang.Class

07-01 19:15:47.503 27556-27556/com.ledo.ledoapp I/art﹕ Rejecting re-init on previously-failed class java.lang.Class

07-01 19:15:47.503 27556-27556/com.ledo.ledoapp I/art﹕ Rejecting re-init on previously-failed class java.lang.Class

但是,如果将视图设置为在XML文件中可见,则圆形显示确实有效,但问题是如果我将视图“circBack”设置为在XML中可见,它从应用程序启动时开始显示,这通常是.

任何解决这个问题的方法?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值