From 3e7279b4deb93cfffe2cc61d63fda35c5bed5a17 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 8 Nov 2022 13:27:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=92=AD=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=AF=86=E7=A0=81=E6=88=BF=E6=97=A0=E5=8F=8D=E5=BA=94?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/views/LiveNewReadyRyViewHolder.java | 50 +++++++------------ 1 file changed, 19 insertions(+), 31 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java index 6ddb0eee6..5a35a612b 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java @@ -66,8 +66,6 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl private int mLiveType;//房间类型 private int mLiveTypeVal;//房间密码,门票收费金额 private int mLiveTimeCoin;//计时收费金额 - private ActivityResultCallback mActivityResultCallback; - private CommonCallback mLiveTypeCallback; private boolean mOpenLocation = true; private int mLiveSdk; private LiveClassBean classBean; @@ -165,32 +163,6 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl findViewById(R.id.btn_start_live).setOnClickListener(this); findViewById(R.id.btn_wishlist).setOnClickListener(this); findViewById(R.id.btn_horizontally).setOnClickListener(this); - mActivityResultCallback = new ActivityResultCallback() { - @Override - public void onSuccess(Intent intent) { - mLiveClassID = intent.getIntExtra(Constants.CLASS_ID, 0); - mLiveClass.setText(intent.getStringExtra(Constants.CLASS_NAME)); - } - }; - mLiveTypeCallback = new CommonCallback() { - @Override - public void callback(LiveRoomTypeBean bean) { - switch (bean.getId()) { - case Constants.LIVE_TYPE_NORMAL: - onLiveTypeNormal(bean); - break; - case Constants.LIVE_TYPE_PWD: - onLiveTypePwd(bean); - break; - case Constants.LIVE_TYPE_PAY: - onLiveTypePay(bean); - break; - case Constants.LIVE_TYPE_TIME: - onLiveTypeTime(bean); - break; - } - } - }; manager = new FaceManager(); manager.setFaceStatusChanged(new FaceManager.FaceStatusChanged() { final Handler handler = new Handler(Looper.getMainLooper()); @@ -382,7 +354,25 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl bundle.putInt(Constants.CHECKED_ID, mLiveType); LiveNewRoomTypeDialogFragment fragment = new LiveNewRoomTypeDialogFragment(); fragment.setArguments(bundle); - fragment.setCallback(mLiveTypeCallback); + fragment.setCallback(new CommonCallback() { + @Override + public void callback(LiveRoomTypeBean bean) { + switch (bean.getId()) { + case Constants.LIVE_TYPE_NORMAL: + onLiveTypeNormal(bean); + break; + case Constants.LIVE_TYPE_PWD: + onLiveTypePwd(bean); + break; + case Constants.LIVE_TYPE_PAY: + onLiveTypePay(bean); + break; + case Constants.LIVE_TYPE_TIME: + onLiveTypeTime(bean); + break; + } + } + }); fragment.show(((LiveRyAnchorActivity) mContext).getSupportFragmentManager(), "LiveRoomTypeDialogFragment"); } @@ -529,8 +519,6 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl public void release() { mImageUtil = null; - mActivityResultCallback = null; - mLiveTypeCallback = null; } @Override