private void setTargetOffsetTopAndBottom(int offset) {
circle.offsetTopAndBottom(offset);
currentTargetOffsetTop = circle.getTop();
int percent = (int) ((currentTargetOffsetTop / distanceToTriggerSync) * 100);
if (onSwipeListener != null) {
onSwipeListener.onSwipe(percent, currentTargetOffsetTop);
}
ViewCompat.setElevation(circle, percent);
ImageView imageView = (ImageView) circle;
ClipDrawable clipDrawable = (ClipDrawable) imageView.getDrawable();
if (percent < 50) {
clipDrawable.setLevel(0);
} else {
clipDrawable.setLevel((percent - 50) * 2 * 100);
}
}
SwipeClearLayout.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:yelo-android
作者:
评论列表
文章目录