11111
This commit is contained in:
@@ -858,7 +858,6 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
* 打开聊天输入框
|
||||
*/
|
||||
public void openChatWindow() {
|
||||
// if ("1".equals(Constants.isSend)) {
|
||||
if (mKeyBoardHeightUtil == null) {
|
||||
mKeyBoardHeightUtil = new KeyBoardHeightUtil2(mContext, super.findViewById(android.R.id.content), this);
|
||||
mKeyBoardHeightUtil.start();
|
||||
@@ -872,9 +871,6 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
bundle.putString(Constants.COIN_NAME, mCoinName);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(getSupportFragmentManager(), "LiveInputDialogFragment");
|
||||
// } else {
|
||||
// showTaskDialog();
|
||||
// }
|
||||
}
|
||||
|
||||
private void showTaskDialog() {
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.yunbao.live.activity;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -22,6 +23,7 @@ import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.InstructorRemarkManager;
|
||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.SystemChatMessageAdapter;
|
||||
@@ -148,10 +150,19 @@ public class PDLIiveChatActivity extends FragmentActivity {
|
||||
if (code == 0 && info.length > 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
SearchUserBean userBean = JSON.toJavaObject(obj, SearchUserBean.class);
|
||||
UserInfo userInfo = new UserInfo(userId, userBean.getUserNiceName(), Uri.parse(userBean.getAvatar()));
|
||||
//使用空白字段存储自己服务器用户的所有的信息
|
||||
userInfo.setExtra(GsonUtils.toJson(userBean));
|
||||
RongUserInfoManager.getInstance().refreshUserInfoCache(userInfo);
|
||||
String userNiceName = "";
|
||||
String remark = InstructorRemarkManager.get(mContext).getInstructorRemark().get(userId);
|
||||
if (!TextUtils.isEmpty(remark)) {
|
||||
userNiceName = remark;
|
||||
} else {
|
||||
userNiceName = userBean.getUserNiceName();
|
||||
}
|
||||
if (!TextUtils.isEmpty(userNiceName) && !TextUtils.isEmpty(userBean.getAvatar())) {
|
||||
UserInfo userInfo = new UserInfo(userId, userNiceName, Uri.parse(userBean.getAvatar()));
|
||||
//使用空白字段存储自己服务器用户的所有的信息
|
||||
userInfo.setExtra(GsonUtils.toJson(userBean));
|
||||
RongUserInfoManager.getInstance().refreshUserInfoCache(userInfo);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
||||
window.setWindowAnimations(R.style.bottomToTopAnim);
|
||||
WindowManager.LayoutParams params = window.getAttributes();
|
||||
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
params.height = DpUtil.dp2px(50);
|
||||
params.height = DpUtil.dp2px(100);
|
||||
params.gravity = Gravity.BOTTOM;
|
||||
window.setAttributes(params);
|
||||
}
|
||||
|
||||
@@ -393,8 +393,6 @@ public class SocketClient {
|
||||
buyGuardMsgBean.setUid(map.getString("uid"));
|
||||
buyGuardMsgBean.setUserName(map.getString("ct"));
|
||||
buyGuardMsgBean.setVotes(map.getString("votestotal"));
|
||||
// buyGuardMsgBean.setGuardNum(map.getIntValue("guard_nums"));
|
||||
// buyGuardMsgBean.setGuardType(map.getIntValue("guard_type"));
|
||||
mListener.onBuyNobility(buyGuardMsgBean);
|
||||
|
||||
}
|
||||
|
||||
@@ -301,25 +301,6 @@ public class SocketRyChatUtil {
|
||||
Log.i("tag", "禮物im");
|
||||
}
|
||||
});
|
||||
// V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(),"g"+liveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||
// @Override
|
||||
// public void onProgress(int progress) {
|
||||
// Log.i("tx","发送中"+progress);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(V2TIMMessage v2TIMMessage) {
|
||||
// Log.i("tx","发送成功");
|
||||
//// SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString()+"");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String desc) {
|
||||
// Log.i("tx",code+"发送失败"+desc);
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
|
||||
9
live/src/main/res/drawable/background_horn.xml
Normal file
9
live/src/main/res/drawable/background_horn.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:topLeftRadius="20dp" android:topRightRadius="20dp" />
|
||||
<solid android:color="#fff" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -1,54 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#e6ffffff"
|
||||
android:layout_height="100dp"
|
||||
android:background="@drawable/background_horn"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
android:orientation="vertical">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/danmu"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="3dp"
|
||||
android:background="@drawable/bg_input_danmu_switch"
|
||||
android:button="@null"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
android:layout_height="50dp">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/danmu"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="3dp"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/bg_input_danmu_switch"
|
||||
android:button="@null" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_live_input"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/live_say_something"
|
||||
android:imeActionLabel="@string/send"
|
||||
android:imeOptions="actionSend"
|
||||
android:maxLength="50"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/textColor"
|
||||
android:textColorHint="@color/gray3"
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_live_input"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/live_say_something"
|
||||
android:imeActionLabel="@string/send"
|
||||
android:imeOptions="actionSend"
|
||||
android:maxLength="50"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/textColor"
|
||||
android:textColorHint="@color/gray3"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
<com.yunbao.common.custom.MyRadioButton
|
||||
android:id="@+id/btn_send"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="3dp"
|
||||
android:background="@drawable/bg_live_input_btn"
|
||||
android:button="@null"
|
||||
android:gravity="center" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.yunbao.common.custom.MyRadioButton
|
||||
android:id="@+id/btn_send"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="3dp"
|
||||
android:background="@drawable/bg_live_input_btn"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user