动态详情页 房间更多页面 私聊消息子item UI修改

This commit is contained in:
huangjian
2021-03-12 16:29:01 +08:00
parent 641e3b0bf2
commit 2cc9cc2233
37 changed files with 189 additions and 314 deletions

View File

@@ -57,7 +57,7 @@
<EditText
android:id="@+id/editTextMessage"
android:textCursorDrawable="@null"
android:textColor="@color/black"
android:textColor="@color/white"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/bottom_component_margin_horizontal"
@@ -69,14 +69,14 @@
android:imeOptions="actionSend"
android:inputType="text"
android:hint="@string/message_hint"
android:textColorHint="#C6C6C6"
android:textColorHint="#555574"
android:paddingStart="@dimen/dp_10"
android:paddingEnd="10dp"
android:background="@drawable/bg_message_input"
android:minHeight="35dp"
android:maxHeight="72dp"
android:maxLines="4"
android:textSize="15sp" />
android:textSize="13sp" />
<ImageView
android:id="@+id/emoji_button"

View File

@@ -33,6 +33,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/emptyBg1"
android:textColor="#C6C6E9"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dip"
android:gravity="center"/>

View File

@@ -122,7 +122,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
private volatile boolean disable;
private String hintText;
private boolean isChat;
public InputPanel(Container container, View view, List<BaseAction> actions, boolean isTextAudioSwitchShow) {
@@ -200,31 +199,31 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
private void initViews() {
// input bar
messageActivityBottomLayout = (LinearLayout) view.findViewById(R.id.messageActivityBottomLayout);
messageActivityBottomLayout = view.findViewById(R.id.messageActivityBottomLayout);
messageInputBar = view.findViewById(R.id.textMessageLayout);
switchToTextButtonInInputBar = view.findViewById(R.id.buttonTextMessage);
switchToAudioButtonInInputBar = view.findViewById(R.id.buttonAudioMessage);
moreFuntionButtonInInputBar = view.findViewById(R.id.buttonMoreFuntionInText);
emojiButtonInInputBar = view.findViewById(R.id.emoji_button);
sendMessageButtonInInputBar = view.findViewById(R.id.buttonSendMessage);
messageEditText = (EditText) view.findViewById(R.id.editTextMessage);
messageEditText = view.findViewById(R.id.editTextMessage);
// 语音
audioRecordBtn = (Button) view.findViewById(R.id.audioRecord);
audioRecordBtn = view.findViewById(R.id.audioRecord);
audioAnimLayout = view.findViewById(R.id.layoutPlayAudio);
time = (Chronometer) view.findViewById(R.id.timer);
timerTip = (TextView) view.findViewById(R.id.timer_tip);
timerTipContainer = (LinearLayout) view.findViewById(R.id.timer_tip_container);
time = view.findViewById(R.id.timer);
timerTip = view.findViewById(R.id.timer_tip);
timerTipContainer = view.findViewById(R.id.timer_tip_container);
// 表情
emoticonPickerView = (EmoticonPickerView) view.findViewById(R.id.emoticon_picker_view);
emoticonPickerView = view.findViewById(R.id.emoticon_picker_view);
// 显示录音按钮
switchToTextButtonInInputBar.setVisibility(View.GONE);
switchToAudioButtonInInputBar.setVisibility(View.VISIBLE);
// 文本录音按钮切换布局
textAudioSwitchLayout = (FrameLayout) view.findViewById(R.id.switchLayout);
textAudioSwitchLayout = view.findViewById(R.id.switchLayout);
if (isTextAudioSwitchShow) {
textAudioSwitchLayout.setVisibility(View.VISIBLE);
} else {
@@ -278,13 +277,9 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
return false;
});
messageEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
messageEditText.setHint("");
checkSendButtonEnable(messageEditText);
}
messageEditText.setOnFocusChangeListener((v, hasFocus) -> {
messageEditText.setHint("");
checkSendButtonEnable(messageEditText);
});
messageEditText.addTextChangedListener(new TextWatcher() {
@@ -377,7 +372,7 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
* ************************* 键盘布局切换 *******************************
*/
private View.OnClickListener clickListener = new View.OnClickListener() {
private final View.OnClickListener clickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -591,21 +586,21 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
actionPanelBottomLayoutHasSetup = true;
}
private Runnable showEmojiRunnable = new Runnable() {
private final Runnable showEmojiRunnable = new Runnable() {
@Override
public void run() {
emoticonPickerView.setVisibility(View.VISIBLE);
}
};
private Runnable showMoreFuncRunnable = new Runnable() {
private final Runnable showMoreFuncRunnable = new Runnable() {
@Override
public void run() {
actionPanelBottomLayout.setVisibility(View.VISIBLE);
}
};
private Runnable showTextRunnable = new Runnable() {
private final Runnable showTextRunnable = new Runnable() {
@Override
public void run() {
showInputMethod(messageEditText);
@@ -748,12 +743,8 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
int[] location = new int[2];
view.getLocationOnScreen(location);
if (event.getRawX() < location[0] || event.getRawX() > location[0] + view.getWidth()
|| event.getRawY() < location[1] - 40) {
return true;
}
return false;
return event.getRawX() < location[0] || event.getRawX() > location[0] + view.getWidth()
|| event.getRawY() < location[1] - 40;
}
/**
@@ -961,9 +952,8 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
container.proxy.sendMessage(customMessage);
}
public void setLimitLevel(boolean isChat,String msg) {
public void setLimitLevel(boolean isChat, String msg) {
this.isChat = isChat;
this.hintText = msg;
setEditTextState();
}