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