改回联系方式礼物接口,仅显示热门分类下的礼物
This commit is contained in:
@@ -177,8 +177,8 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchor
|
||||
}
|
||||
})
|
||||
.setShowNumber(false)
|
||||
.setOldGiftList(true)
|
||||
.setTitle(WordUtil.getString(R.string.live_anchor_edit_call_me_select_gift))
|
||||
.setHideGiftType(true)
|
||||
.showDialog()
|
||||
;
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene
|
||||
private String title;
|
||||
private TextView mTitle;
|
||||
private boolean isOldGiftList = false;
|
||||
private boolean hideGiftType=false;
|
||||
|
||||
|
||||
public GiftPopDialog(@NonNull Context context) {
|
||||
@@ -133,6 +134,9 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene
|
||||
if (!StringUtil.isEmpty(title)) {
|
||||
mTitle.setText(title);
|
||||
}
|
||||
if(hideGiftType){
|
||||
findViewById(R.id.gift_tab_layout).setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public GiftPopDialog(Context mContext, GiftPopDialog.ActionListener actionListener) {
|
||||
@@ -165,6 +169,11 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene
|
||||
return this;
|
||||
}
|
||||
|
||||
public GiftPopDialog setHideGiftType(boolean hideGiftType) {
|
||||
this.hideGiftType = hideGiftType;
|
||||
return this;
|
||||
}
|
||||
|
||||
private void initDate() {
|
||||
if (isOldGiftList) {
|
||||
LiveHttpUtil.getGiftList(new HttpCallback() {
|
||||
|
||||
@@ -301,7 +301,6 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
by = bundle.getString("by");
|
||||
isContactGift = bundle.getBoolean("isContactGift", false) ? 1 : 0;
|
||||
if (isContactGift == 1) {
|
||||
mViewPager.setTouch(false);
|
||||
findViewById(R.id.gift_tab_layout).setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
@@ -352,56 +351,29 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
}
|
||||
}
|
||||
if (list == null) {
|
||||
if (isContactGift == 1) {
|
||||
LiveHttpUtil.getGiftList(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
obj.put("listarray", obj.getJSONArray("giftlist"));
|
||||
list = obj.getJSONArray("listarray");
|
||||
Log.i("tttts", obj.getString("giftlist") + "");
|
||||
List<LiveGiftBean> _list = JSON.parseArray(obj.getJSONArray("giftlist").toJSONString(), LiveGiftBean.class);
|
||||
showGiftList(_list);
|
||||
mGiftPackage.setTextColor(Color.parseColor("#FFFFFF"));
|
||||
mCoin.setText(obj.getString("coin"));
|
||||
mTvGoldCoin.setText(obj.getString("gold"));
|
||||
Bus.getOn(LiveGiftDialogFragment.this);
|
||||
}
|
||||
}
|
||||
LiveHttpUtil.getNewGiftList(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
list = obj.getJSONArray("listarray");
|
||||
Log.i("tttts", obj.getString("listarray") + "");
|
||||
CommonAppConfig.getInstance().setGiftListJson(obj.getString("listarray"));
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
if (mLoading != null) {
|
||||
mLoading.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
upData();
|
||||
mCoin.setText(obj.getString("coin"));
|
||||
mTvGoldCoin.setText(obj.getString("gold"));
|
||||
Bus.getOn(LiveGiftDialogFragment.this);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
LiveHttpUtil.getNewGiftList(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
list = obj.getJSONArray("listarray");
|
||||
Log.i("tttts", obj.getString("listarray") + "");
|
||||
CommonAppConfig.getInstance().setGiftListJson(obj.getString("listarray"));
|
||||
}
|
||||
|
||||
upData();
|
||||
mCoin.setText(obj.getString("coin"));
|
||||
mTvGoldCoin.setText(obj.getString("gold"));
|
||||
Bus.getOn(LiveGiftDialogFragment.this);
|
||||
}
|
||||
@Override
|
||||
public void onFinish() {
|
||||
if (mLoading != null) {
|
||||
mLoading.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
if (mLoading != null) {
|
||||
mLoading.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
mLoading.setVisibility(View.INVISIBLE);
|
||||
upData();
|
||||
@@ -496,9 +468,6 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
bean.setChecked(true);
|
||||
itemCheckOp(bean);
|
||||
mViewPager.setCurrentItem(i / 8);
|
||||
if (isContactGift == 1) {
|
||||
mLiveGiftPagerAdapter.disTouch(bean.getId());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user