主播聊天问题修复

This commit is contained in:
18401019693 2022-11-30 13:20:23 +08:00
parent f257c2b5a9
commit a41a58dc26
4 changed files with 22 additions and 26 deletions

View File

@ -844,13 +844,13 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
* 打开聊天输入框
*/
public void openChatWindow() {
if (mKeyBoardHeightUtil == null) {
mKeyBoardHeightUtil = new KeyBoardHeightUtil2(mContext, super.findViewById(android.R.id.content), this);
mKeyBoardHeightUtil.start();
}
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.chatScrollToBottom();
}
// if (mKeyBoardHeightUtil == null) {
// mKeyBoardHeightUtil = new KeyBoardHeightUtil2(mContext, super.findViewById(android.R.id.content), this);
// mKeyBoardHeightUtil.start();
// }
// if (mLiveRoomViewHolder != null) {
// mLiveRoomViewHolder.chatScrollToBottom();
// }
LiveInputDialogFragment fragment = new LiveInputDialogFragment();
Bundle bundle = new Bundle();
bundle.putString(Constants.LIVE_DANMU_PRICE, mDanmuPrice);

View File

@ -238,6 +238,9 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
case GENERALMESSAGE:
((LiveActivity) mContext).sendChatMessage(content, atTextWatcher.getAtUserID(), atTextWatcher.getAtUserName());
atTextWatcher.clearMsg();
if (imm != null) {
imm.hideSoftInputFromWindow(mInput.getWindowToken(), 0);
}
dismiss();
break;
}

View File

@ -1,19 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/live_bg"
>
android:background="@mipmap/live_bg">
<FrameLayout
android:id="@+id/preview_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/container_wrap"
@ -23,21 +20,18 @@
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
android:layout_height="match_parent" />
</FrameLayout>
<pl.droidsonroids.gif.GifImageView
android:id="@+id/gift_gif"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:scaleType="centerCrop"/>
android:scaleType="centerCrop" />
<com.opensource.svgaplayer.SVGAImageView
android:id="@+id/gift_svga"
@ -46,11 +40,11 @@
android:layout_gravity="center_vertical"
android:scaleType="centerCrop"
app:autoPlay="true"
app:loopCount="1"/>
app:loopCount="1" />
<FrameLayout
android:id="@+id/page_container"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent" />
</FrameLayout>

View File

@ -166,18 +166,17 @@ PK"
android:id="@+id/et_input"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginLeft="45dp"
android:background="@drawable/bg_live_item"
android:alpha="0.5"
android:layout_centerVertical="true"
android:layout_marginLeft="45dp"
android:layout_toLeftOf="@id/btn_pk"
android:alpha="0.5"
android:background="@drawable/bg_live_item"
android:hint="@string/live_say_something"
android:padding="5dp"
android:singleLine="true"
android:textColor="@color/textColor"
android:textColorHint="@color/gray3"
android:textSize="14sp"
android:layout_toLeftOf="@id/btn_pk"
/>
android:textSize="14sp" />
<ImageView
android:layout_centerVertical="true"
android:id="@+id/btn_chat"