From a41a58dc268a2fb033c2bac56c4aba1854317bd3 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 30 Nov 2022 13:20:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E6=92=AD=E8=81=8A=E5=A4=A9=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/activity/LiveActivity.java | 14 ++++++------- .../live/dialog/LiveInputDialogFragment.java | 3 +++ .../main/res/layout/activity_live_anchor.xml | 20 +++++++------------ live/src/main/res/layout/view_live_anchor.xml | 11 +++++----- 4 files changed, 22 insertions(+), 26 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java index fae9f031f..d6845d854 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java @@ -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); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java index b17edacc4..691cb0e04 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java @@ -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; } diff --git a/live/src/main/res/layout/activity_live_anchor.xml b/live/src/main/res/layout/activity_live_anchor.xml index eea5fe516..9d6bf5af3 100644 --- a/live/src/main/res/layout/activity_live_anchor.xml +++ b/live/src/main/res/layout/activity_live_anchor.xml @@ -1,19 +1,16 @@ - + android:background="@mipmap/live_bg"> + android:layout_height="match_parent" /> - + android:layout_height="match_parent" /> - + android:scaleType="centerCrop" /> + app:loopCount="1" /> + android:layout_height="match_parent" /> \ No newline at end of file diff --git a/live/src/main/res/layout/view_live_anchor.xml b/live/src/main/res/layout/view_live_anchor.xml index c48b2d60f..ac69ccabc 100644 --- a/live/src/main/res/layout/view_live_anchor.xml +++ b/live/src/main/res/layout/view_live_anchor.xml @@ -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" />