优化首页右下角悬浮层隐藏显示问题
调整直播间购买推荐的UI显示不合设计问题
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package com.yunbao.common.custom;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import com.stx.xhb.androidx.transformers.BasePageTransformer;
|
||||
|
||||
public class LiveGuardScalePageTransformer extends BasePageTransformer {
|
||||
/**
|
||||
* author: xiaohaibin.
|
||||
* time: 2018/10/9
|
||||
* mail:xhb_199409@163.com
|
||||
* github:https://github.com/xiaohaibin
|
||||
* describe: 适用于一屏显示多个模式
|
||||
*/
|
||||
private static final float MIN_SCALE = 0.8F;
|
||||
|
||||
@Override
|
||||
public void handleInvisiblePage(View view, float position) {
|
||||
view.setScaleY(MIN_SCALE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleLeftPage(View view, float position) {
|
||||
float scale = Math.max(MIN_SCALE, 1 - Math.abs(position));
|
||||
view.setScaleY(scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleRightPage(View view, float position) {
|
||||
float scale = Math.max(MIN_SCALE, 1 - Math.abs(position));
|
||||
view.setScaleY(scale);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user