主播设置完心愿单直播间进行修改
This commit is contained in:
parent
8efa3b62e2
commit
2799991ef3
@ -1,6 +1,7 @@
|
|||||||
package com.yunbao.common.fragment;
|
package com.yunbao.common.fragment;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -19,6 +20,7 @@ import com.yunbao.common.bean.WishModel2;
|
|||||||
import com.yunbao.common.event.LiveNewWishListCloseEvent;
|
import com.yunbao.common.event.LiveNewWishListCloseEvent;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
@ -34,7 +36,11 @@ public class LiveNewWishListFragment extends BaseFragment {
|
|||||||
private RecyclerView wishList;
|
private RecyclerView wishList;
|
||||||
private LiveNewWishAdapter liveNewWishAdapter;
|
private LiveNewWishAdapter liveNewWishAdapter;
|
||||||
private ImageView imageView2, tvDone;
|
private ImageView imageView2, tvDone;
|
||||||
|
private CommonCallback<Boolean> mSetResultCallback ;
|
||||||
|
|
||||||
|
public void setResultCallback(CommonCallback<Boolean> mCommonCallback) {
|
||||||
|
this.mSetResultCallback = mCommonCallback;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
|
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
|
||||||
return layoutInflater.inflate(R.layout.view_live_new_wish, viewGroup, false);
|
return layoutInflater.inflate(R.layout.view_live_new_wish, viewGroup, false);
|
||||||
@ -151,6 +157,9 @@ public class LiveNewWishListFragment extends BaseFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(String data) {
|
public void onSuccess(String data) {
|
||||||
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
||||||
|
if (mSetResultCallback!=null){
|
||||||
|
mSetResultCallback.callback(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -183,6 +192,10 @@ public class LiveNewWishListFragment extends BaseFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(String data) {
|
public void onSuccess(String data) {
|
||||||
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
||||||
|
//这里需要通知刷新心愿信息
|
||||||
|
if (mSetResultCallback!=null){
|
||||||
|
mSetResultCallback.callback(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -202,6 +215,9 @@ public class LiveNewWishListFragment extends BaseFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(String data) {
|
public void onSuccess(String data) {
|
||||||
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
||||||
|
if (mSetResultCallback!=null){
|
||||||
|
mSetResultCallback.callback(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2,6 +2,8 @@ package com.yunbao.common.views;
|
|||||||
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.KeyEvent;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -28,6 +30,7 @@ import com.yunbao.common.event.PopupViewDismissEvent;
|
|||||||
import com.yunbao.common.fragment.LiveNewWishListFragment;
|
import com.yunbao.common.fragment.LiveNewWishListFragment;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
@ -61,6 +64,12 @@ public class LiveNewWishListPopup extends BottomPopupView {
|
|||||||
private LiveNewWishListFragment dayWishFragment, zhouXinFragment, lunarWishFragment, seasonalWishFragment;
|
private LiveNewWishListFragment dayWishFragment, zhouXinFragment, lunarWishFragment, seasonalWishFragment;
|
||||||
private ImageView wishListTop;
|
private ImageView wishListTop;
|
||||||
|
|
||||||
|
private CommonCallback<Boolean> mSetResultCallback ;
|
||||||
|
|
||||||
|
public void setResultCallback(CommonCallback<Boolean> mCommonCallback) {
|
||||||
|
this.mSetResultCallback = mCommonCallback;
|
||||||
|
}
|
||||||
|
|
||||||
public LiveNewWishListPopup(@NonNull FragmentActivity context) {
|
public LiveNewWishListPopup(@NonNull FragmentActivity context) {
|
||||||
super(context);
|
super(context);
|
||||||
mContext = context;
|
mContext = context;
|
||||||
@ -198,6 +207,10 @@ public class LiveNewWishListPopup extends BottomPopupView {
|
|||||||
zhouXinFragment = LiveNewWishListFragment.newInstance(2);
|
zhouXinFragment = LiveNewWishListFragment.newInstance(2);
|
||||||
lunarWishFragment = LiveNewWishListFragment.newInstance(3);
|
lunarWishFragment = LiveNewWishListFragment.newInstance(3);
|
||||||
seasonalWishFragment = LiveNewWishListFragment.newInstance(4);
|
seasonalWishFragment = LiveNewWishListFragment.newInstance(4);
|
||||||
|
dayWishFragment.setResultCallback(mSetResultCallback);
|
||||||
|
zhouXinFragment.setResultCallback(mSetResultCallback);
|
||||||
|
lunarWishFragment.setResultCallback(mSetResultCallback);
|
||||||
|
seasonalWishFragment.setResultCallback(mSetResultCallback);
|
||||||
ViewList.add(dayWishFragment);
|
ViewList.add(dayWishFragment);
|
||||||
ViewList.add(zhouXinFragment);
|
ViewList.add(zhouXinFragment);
|
||||||
ViewList.add(lunarWishFragment);
|
ViewList.add(lunarWishFragment);
|
||||||
|
@ -1504,7 +1504,7 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="live_interaction_god_say">Notice</string>
|
<string name="live_interaction_god_say">Notice</string>
|
||||||
<string name="live_interaction_ask_question">Start Q&A</string>
|
<string name="live_interaction_ask_question">Start Q&A</string>
|
||||||
<string name="ai_anguage_settings">Language Settings</string>
|
<string name="ai_anguage_settings">Language Settings</string>
|
||||||
<string name="open_vip_live">openVip</string>
|
<string name="open_vip_live">open Vip</string>
|
||||||
<string name="chang_langue_tips">After this setting, all robot languages will be covered by translation, please confirm whether this operation is completed!</string>
|
<string name="chang_langue_tips">After this setting, all robot languages will be covered by translation, please confirm whether this operation is completed!</string>
|
||||||
<string name="return_str">return</string>
|
<string name="return_str">return</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1447,7 +1447,7 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="live_interaction_game">Game</string>
|
<string name="live_interaction_game">Game</string>
|
||||||
<string name="live_interaction_god_say">Notice</string>
|
<string name="live_interaction_god_say">Notice</string>
|
||||||
<string name="live_interaction_ask_question">Start Q&A</string>
|
<string name="live_interaction_ask_question">Start Q&A</string>
|
||||||
<string name="open_vip_live">openVip</string>
|
<string name="open_vip_live">open Vip</string>
|
||||||
<string name="ai_anguage_settings">Language Settings</string>
|
<string name="ai_anguage_settings">Language Settings</string>
|
||||||
<string name="chang_langue_tips">After this setting, all robot languages will be covered by translation, please confirm whether this operation is completed!</string>
|
<string name="chang_langue_tips">After this setting, all robot languages will be covered by translation, please confirm whether this operation is completed!</string>
|
||||||
|
|
||||||
|
@ -68,6 +68,7 @@ import com.yunbao.common.http.HttpClient;
|
|||||||
import com.yunbao.common.http.LiveHttpConsts;
|
import com.yunbao.common.http.LiveHttpConsts;
|
||||||
import com.yunbao.common.http.LiveHttpUtil;
|
import com.yunbao.common.http.LiveHttpUtil;
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.manager.MicUserManager;
|
import com.yunbao.common.manager.MicUserManager;
|
||||||
import com.yunbao.common.manager.MicedUserManager;
|
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) {
|
// if (mContext instanceof LiveRyAnchorActivity) {
|
||||||
// fragment.show(((LiveRyAnchorActivity) mContext).getSupportFragmentManager(), "LiveWishListDialogFragment");
|
// fragment.show(((LiveRyAnchorActivity) mContext).getSupportFragmentManager(), "LiveWishListDialogFragment");
|
||||||
// }
|
// }
|
||||||
|
LiveNewWishListPopup popup= new LiveNewWishListPopup(LiveSwAnchorActivity.this);
|
||||||
|
popup.setResultCallback(resultCallBack);
|
||||||
new XPopup.Builder(mContext)
|
new XPopup.Builder(mContext)
|
||||||
.enableDrag(false)
|
.enableDrag(false)
|
||||||
.asCustom(new LiveNewWishListPopup(LiveSwAnchorActivity.this))
|
.asCustom(popup)
|
||||||
|
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user