签约 1
This commit is contained in:
@@ -92,6 +92,7 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
|
||||
private final SVGAParser parser = new SVGAParser(CommonAppContext.getInstance());
|
||||
|
||||
public boolean isMentorShip = false;
|
||||
|
||||
public BaseWheatView(Context context) {
|
||||
this(context, null, 0);
|
||||
@@ -158,6 +159,9 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
}
|
||||
}
|
||||
|
||||
public void isMentorShip(boolean isMentorShip) {
|
||||
this.isMentorShip = isMentorShip;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置麦位数据
|
||||
@@ -201,52 +205,56 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
|
||||
setPitData(bean);
|
||||
|
||||
//心动值
|
||||
//显示心动
|
||||
if ("1".equals(pitBean.getShutup())) {
|
||||
mIvShutup.setVisibility(VISIBLE);
|
||||
} else {
|
||||
mIvShutup.setVisibility(GONE);
|
||||
}
|
||||
|
||||
//自动调节麦位波纹
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.setScaleX(1.1f);
|
||||
mIvRipple.setScaleY(1.1f);
|
||||
}
|
||||
if (pitNumber.equals("9")) {
|
||||
iv_tag_type.setImageResource(R.mipmap.zc);
|
||||
if (mRiv.getLayoutParams() instanceof ConstraintLayout.LayoutParams) {
|
||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mRiv.getLayoutParams();
|
||||
params.matchConstraintPercentWidth = 0.66f; // 设置为 52%
|
||||
params.width = 0; // 必须设为 0dp(MATCH_CONSTRAINT)
|
||||
mRiv.setLayoutParams(params);
|
||||
if (!isMentorShip){
|
||||
|
||||
//心动值
|
||||
//显示心动
|
||||
if ("1".equals(pitBean.getShutup())) {
|
||||
mIvShutup.setVisibility(VISIBLE);
|
||||
} else {
|
||||
mIvShutup.setVisibility(GONE);
|
||||
}
|
||||
} else if (pitNumber.equals("10")) {
|
||||
iv_tag_type.setImageResource(R.mipmap.jb);
|
||||
if (mRiv.getLayoutParams() instanceof ConstraintLayout.LayoutParams) {
|
||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mRiv.getLayoutParams();
|
||||
params.matchConstraintPercentWidth = 0.66f; // 设置为 52%
|
||||
params.width = 0; // 必须设为 0dp(MATCH_CONSTRAINT)
|
||||
mRiv.setLayoutParams(params);
|
||||
|
||||
if (pitNumber.equals("9")) {
|
||||
iv_tag_type.setImageResource(R.mipmap.zc);
|
||||
if (mRiv.getLayoutParams() instanceof ConstraintLayout.LayoutParams) {
|
||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mRiv.getLayoutParams();
|
||||
params.matchConstraintPercentWidth = 0.66f; // 设置为 52%
|
||||
params.width = 0; // 必须设为 0dp(MATCH_CONSTRAINT)
|
||||
mRiv.setLayoutParams(params);
|
||||
}
|
||||
} else if (pitNumber.equals("10")) {
|
||||
iv_tag_type.setImageResource(R.mipmap.jb);
|
||||
if (mRiv.getLayoutParams() instanceof ConstraintLayout.LayoutParams) {
|
||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mRiv.getLayoutParams();
|
||||
params.matchConstraintPercentWidth = 0.66f; // 设置为 52%
|
||||
params.width = 0; // 必须设为 0dp(MATCH_CONSTRAINT)
|
||||
mRiv.setLayoutParams(params);
|
||||
}
|
||||
} else if (pitNumber.equals("-1")) {
|
||||
iv_tag_type.setImageResource(R.mipmap.mu_yc);
|
||||
if (mRiv.getLayoutParams() instanceof ConstraintLayout.LayoutParams) {
|
||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mRiv.getLayoutParams();
|
||||
params.matchConstraintPercentWidth = 0.66f; // 设置为 52%
|
||||
params.width = 0; // 必须设为 0dp(MATCH_CONSTRAINT)
|
||||
mRiv.setLayoutParams(params);
|
||||
}
|
||||
} else if (pitNumber.equals("0")) {
|
||||
iv_tag_type.setVisibility(GONE);
|
||||
mIvShutup.setVisibility(VISIBLE);
|
||||
} else if (pitNumber.equals("888")) {
|
||||
iv_tag_type.setVisibility(GONE);
|
||||
mIvShutup.setVisibility(GONE);
|
||||
} else {
|
||||
iv_tag_type.setVisibility(GONE);
|
||||
}
|
||||
} else if (pitNumber.equals("-1")) {
|
||||
iv_tag_type.setImageResource(R.mipmap.mu_yc);
|
||||
if (mRiv.getLayoutParams() instanceof ConstraintLayout.LayoutParams) {
|
||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mRiv.getLayoutParams();
|
||||
params.matchConstraintPercentWidth = 0.66f; // 设置为 52%
|
||||
params.width = 0; // 必须设为 0dp(MATCH_CONSTRAINT)
|
||||
mRiv.setLayoutParams(params);
|
||||
}
|
||||
} else if (pitNumber.equals("0")) {
|
||||
iv_tag_type.setVisibility(GONE);
|
||||
mIvShutup.setVisibility(VISIBLE);
|
||||
} else if (pitNumber.equals("888")) {
|
||||
iv_tag_type.setVisibility(GONE);
|
||||
mIvShutup.setVisibility(GONE);
|
||||
} else {
|
||||
iv_tag_type.setVisibility(GONE);
|
||||
}
|
||||
|
||||
AgoraManager.getInstance().addSoundLevelListener(new SoundLevelUpdateListener() {
|
||||
@Override
|
||||
public void onRemoteSoundLevelUpdate(String userId, int soundLevel) {
|
||||
|
||||
Reference in New Issue
Block a user