送礼交互优化
This commit is contained in:
@@ -4,6 +4,7 @@ import static com.yunbao.common.CommonAppConfig.isGetNewWrap;
|
||||
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||
import static com.yunbao.live.views.LiveRoomViewHolder.bean1;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
@@ -155,6 +156,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
DialogInterface.OnShowListener onShowListener;
|
||||
private SVGAImageView blindSvga, blindBoxOpen;
|
||||
private View close_view;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.dialog_live_gift_wrap;
|
||||
@@ -1038,7 +1040,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
if (mLiveGiftBean.getType() == LiveGiftBean2.TYPE_NORMAL && !mLiveGiftBean.getSwf().contains("svga")) {
|
||||
showLianBtn();
|
||||
}
|
||||
if (mLiveGiftBean.getType()==7){
|
||||
if (mLiveGiftBean.getType() == 7) {
|
||||
showLianBtn();
|
||||
}
|
||||
//刷新包裹列表wrap_gift_num -1:表示数量没有变化
|
||||
@@ -1085,6 +1087,18 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
AppManager.runDebugCode(() -> {
|
||||
Log.i("gifBean", mLiveGiftBean.toString());
|
||||
});
|
||||
} else if (code == 1001) {
|
||||
hideLianBtn();
|
||||
new DialogUitl.Builder(mContext)
|
||||
.setView(R.layout.dialog_live_unfollow)
|
||||
.setConfirmString(getString(R.string.charge))
|
||||
.setContent(getString(R.string.insufficient_balance))
|
||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
forwardMyCoin(0);
|
||||
}
|
||||
}).build().show();
|
||||
} else {
|
||||
hideLianBtn();
|
||||
ToastUtil.show(msg);
|
||||
|
||||
@@ -2633,17 +2633,21 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
getIsHot();
|
||||
getGuardInfo();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void getGuardInfo() {
|
||||
LiveHttpUtil.getUserList(mLiveUid, mStream, "guard", 1, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
JSONObject json = JSONObject.parseObject(info[0]);
|
||||
JSONArray userlist = json.getJSONArray("userlist");
|
||||
if (userlist.size() != 0) {
|
||||
setGuardIcon(JSONArray.parseArray(userlist.toJSONString(), LiveUserGiftBean.class).get(0));
|
||||
if (code == 0) {
|
||||
JSONObject json = JSONObject.parseObject(info[0]);
|
||||
JSONArray userlist = json.getJSONArray("userlist");
|
||||
if (userlist.size() != 0) {
|
||||
setGuardIcon(JSONArray.parseArray(userlist.toJSONString(), LiveUserGiftBean.class).get(0));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/come_hint"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user