111
This commit is contained in:
@@ -657,16 +657,20 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
* 打开礼物窗口
|
||||
*/
|
||||
public void openGiftWindow() {
|
||||
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream)) {
|
||||
return;
|
||||
}
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||
public void run() {
|
||||
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream)) {
|
||||
return;
|
||||
}
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void openGiftWindow(String giftId) {
|
||||
@@ -687,17 +691,22 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream)) {
|
||||
return;
|
||||
}
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
bundle.putString(Constants.LIVE_WISH_GIFTID, giftId);
|
||||
if (for_by.equals("1")) {
|
||||
bundle.putString("by", "1");
|
||||
}
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||
public void run() {
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
bundle.putString(Constants.LIVE_WISH_GIFTID, giftId);
|
||||
if (for_by.equals("1")) {
|
||||
bundle.putString("by", "1");
|
||||
}
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -147,6 +147,12 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
||||
onTrickerySendGiftInto(new JsWishBean(id));
|
||||
}
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void openWrap() {
|
||||
dismiss();
|
||||
((LiveAudienceActivity) mContext).openGiftWindow();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,9 +172,11 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
||||
|
||||
public void onTrickerySendGiftInto(JsWishBean id) {
|
||||
Log.i("tvs", "來了" + id);
|
||||
if (id != null) {
|
||||
if (id!=null){
|
||||
dismiss();
|
||||
if (mContext instanceof LiveAudienceActivity) {
|
||||
Log.i("tvs","來了111"+id);
|
||||
if (mContext instanceof LiveAudienceActivity){
|
||||
Log.i("tvs","來了333"+id);
|
||||
((LiveAudienceActivity) mContext).openGiftWindow(id.getGiftId(), "1");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user