主播设置完心愿单直播间进行修改
This commit is contained in:
parent
8efa3b62e2
commit
2799991ef3
@ -1,6 +1,7 @@
|
||||
package com.yunbao.common.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -19,6 +20,7 @@ import com.yunbao.common.bean.WishModel2;
|
||||
import com.yunbao.common.event.LiveNewWishListCloseEvent;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
@ -34,7 +36,11 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
private RecyclerView wishList;
|
||||
private LiveNewWishAdapter liveNewWishAdapter;
|
||||
private ImageView imageView2, tvDone;
|
||||
private CommonCallback<Boolean> mSetResultCallback ;
|
||||
|
||||
public void setResultCallback(CommonCallback<Boolean> mCommonCallback) {
|
||||
this.mSetResultCallback = mCommonCallback;
|
||||
}
|
||||
@Override
|
||||
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
|
||||
return layoutInflater.inflate(R.layout.view_live_new_wish, viewGroup, false);
|
||||
@ -151,6 +157,9 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
||||
if (mSetResultCallback!=null){
|
||||
mSetResultCallback.callback(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -183,6 +192,10 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
||||
//这里需要通知刷新心愿信息
|
||||
if (mSetResultCallback!=null){
|
||||
mSetResultCallback.callback(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -202,6 +215,9 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
||||
if (mSetResultCallback!=null){
|
||||
mSetResultCallback.callback(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -2,6 +2,8 @@ package com.yunbao.common.views;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -28,6 +30,7 @@ import com.yunbao.common.event.PopupViewDismissEvent;
|
||||
import com.yunbao.common.fragment.LiveNewWishListFragment;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
@ -61,6 +64,12 @@ public class LiveNewWishListPopup extends BottomPopupView {
|
||||
private LiveNewWishListFragment dayWishFragment, zhouXinFragment, lunarWishFragment, seasonalWishFragment;
|
||||
private ImageView wishListTop;
|
||||
|
||||
private CommonCallback<Boolean> mSetResultCallback ;
|
||||
|
||||
public void setResultCallback(CommonCallback<Boolean> mCommonCallback) {
|
||||
this.mSetResultCallback = mCommonCallback;
|
||||
}
|
||||
|
||||
public LiveNewWishListPopup(@NonNull FragmentActivity context) {
|
||||
super(context);
|
||||
mContext = context;
|
||||
@ -198,6 +207,10 @@ public class LiveNewWishListPopup extends BottomPopupView {
|
||||
zhouXinFragment = LiveNewWishListFragment.newInstance(2);
|
||||
lunarWishFragment = LiveNewWishListFragment.newInstance(3);
|
||||
seasonalWishFragment = LiveNewWishListFragment.newInstance(4);
|
||||
dayWishFragment.setResultCallback(mSetResultCallback);
|
||||
zhouXinFragment.setResultCallback(mSetResultCallback);
|
||||
lunarWishFragment.setResultCallback(mSetResultCallback);
|
||||
seasonalWishFragment.setResultCallback(mSetResultCallback);
|
||||
ViewList.add(dayWishFragment);
|
||||
ViewList.add(zhouXinFragment);
|
||||
ViewList.add(lunarWishFragment);
|
||||
|
@ -68,6 +68,7 @@ import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.http.LiveHttpConsts;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.MicUserManager;
|
||||
import com.yunbao.common.manager.MicedUserManager;
|
||||
@ -588,6 +589,14 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
}
|
||||
|
||||
|
||||
private CommonCallback<Boolean> resultCallBack = new CommonCallback<Boolean>() {
|
||||
@Override
|
||||
public void callback(Boolean bean) {
|
||||
if(true && mLiveRoomViewHolder!=null){
|
||||
mLiveRoomViewHolder.initWishData();
|
||||
}
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 打开心愿单窗口
|
||||
*/
|
||||
@ -596,10 +605,11 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
// if (mContext instanceof LiveRyAnchorActivity) {
|
||||
// fragment.show(((LiveRyAnchorActivity) mContext).getSupportFragmentManager(), "LiveWishListDialogFragment");
|
||||
// }
|
||||
LiveNewWishListPopup popup= new LiveNewWishListPopup(LiveSwAnchorActivity.this);
|
||||
popup.setResultCallback(resultCallBack);
|
||||
new XPopup.Builder(mContext)
|
||||
.enableDrag(false)
|
||||
.asCustom(new LiveNewWishListPopup(LiveSwAnchorActivity.this))
|
||||
|
||||
.asCustom(popup)
|
||||
.show();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user