新贵族喇叭
This commit is contained in:
parent
84c8ecde30
commit
ab3141f5f5
@ -1,7 +1,6 @@
|
|||||||
package com.yunbao.live.dialog;
|
package com.yunbao.live.dialog;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -37,6 +36,7 @@ import com.yunbao.common.utils.ToastUtil;
|
|||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveActivity;
|
import com.yunbao.live.activity.LiveActivity;
|
||||||
|
import com.yunbao.live.http.LiveHttpUtil;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -55,7 +55,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
|||||||
private CheckBox mCheckBox;
|
private CheckBox mCheckBox;
|
||||||
private MyRadioButton mMyRadioButton;
|
private MyRadioButton mMyRadioButton;
|
||||||
private String mHint1;
|
private String mHint1;
|
||||||
private String mHint2;
|
private String mHint2, trumpetMsg;
|
||||||
private RadioGroup radioHornType;
|
private RadioGroup radioHornType;
|
||||||
private int[] radioList = {R.id.btn_0, R.id.btn_1, R.id.btn_2};
|
private int[] radioList = {R.id.btn_0, R.id.btn_1, R.id.btn_2};
|
||||||
private List<RadioButton> radioHornTypes = new ArrayList<>();
|
private List<RadioButton> radioHornTypes = new ArrayList<>();
|
||||||
@ -67,6 +67,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
|||||||
private long nobleId;//贵族等级
|
private long nobleId;//贵族等级
|
||||||
private long trumpetNum;//喇叭数量
|
private long trumpetNum;//喇叭数量
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
return R.layout.dialog_live_chat_input;
|
return R.layout.dialog_live_chat_input;
|
||||||
@ -175,6 +176,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
sendMessage();
|
sendMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
//高级贵族
|
//高级贵族
|
||||||
private void sendMessage() {
|
private void sendMessage() {
|
||||||
String content = mInput.getText().toString().trim();
|
String content = mInput.getText().toString().trim();
|
||||||
@ -184,7 +186,9 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
|||||||
}
|
}
|
||||||
switch (messageType) {
|
switch (messageType) {
|
||||||
case WORLDHORN:
|
case WORLDHORN:
|
||||||
|
trumpetMsg = content;
|
||||||
|
netHandler.post(nobleUseTrumpetRunnable);
|
||||||
|
dismiss();
|
||||||
break;
|
break;
|
||||||
case POPUPSCREEN:
|
case POPUPSCREEN:
|
||||||
((LiveActivity) mContext).sendDanmuMessage(content);
|
((LiveActivity) mContext).sendDanmuMessage(content);
|
||||||
@ -315,4 +319,16 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
//发送全局喇叭
|
||||||
|
private Runnable nobleUseTrumpetRunnable = new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
LiveHttpUtil.nobleUseTrumpet(trumpetMsg, new com.yunbao.common.http.HttpCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ import android.text.TextUtils;
|
|||||||
import com.lzy.okgo.request.PostRequest;
|
import com.lzy.okgo.request.PostRequest;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.CommonAppContext;
|
import com.yunbao.common.CommonAppContext;
|
||||||
import com.yunbao.common.bean.UserBean;
|
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.http.HttpClient;
|
import com.yunbao.common.http.HttpClient;
|
||||||
@ -887,4 +886,12 @@ public class LiveHttpUtil {
|
|||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户贵族喇叭的数量
|
||||||
|
*/
|
||||||
|
public static void nobleUseTrumpet(String trumpet_msg,HttpCallback callback) {
|
||||||
|
HttpClient.getInstance().get("Noble.nobleUseTrumpet", "nobleUseTrumpet")
|
||||||
|
.params("trumpet_msg", trumpet_msg)
|
||||||
|
.execute(callback);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user