Merge branch 'master' into 声网升级

# Conflicts:
#	config.gradle
#	live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java
This commit is contained in:
2024-06-11 14:16:00 +08:00
6 changed files with 102 additions and 24 deletions

View File

@@ -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);
}
}