Skip to content

Commit fc327d1

Browse files
committed
fix a bug
1 parent 4570ed4 commit fc327d1

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

app/src/main/res/drawable/send_button_bg.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:state_enabled="true">
4+
<shape android:shape="rectangle">
5+
<solid android:color="#45C0FF"/>
6+
<corners android:radius="2dp"/>
7+
</shape>
8+
</item>
39
<item android:state_pressed="true">
410
<shape android:shape="rectangle">
511
<solid android:color="#57a3FF"/>
612
<corners android:radius="2dp"/>
713
</shape>
814
</item>
9-
1015
<item>
1116
<shape android:shape="rectangle">
12-
<solid android:color="#45C0FF"/>
17+
<solid android:color="#7745C0FF"/>
1318
<corners android:radius="2dp"/>
1419
</shape>
1520
</item>

keyboard/src/main/java/cn/hadcn/keyboard/ChatKeyboardLayout.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ protected void leftIconClicked(View view) {
399399
closeSoftKeyboard(etInputArea);
400400
rlInput.setVisibility(INVISIBLE);
401401
btnRecording.setVisibility(VISIBLE);
402-
leftIconView.setImageDrawable(mLeftDefaultIcon);
402+
leftIconView.setImageDrawable(mLeftSecondIcon);
403403
btnSend.setVisibility(GONE);
404404
if (isShowRightIcon) {
405405
rightIconView.setVisibility(VISIBLE);
@@ -410,7 +410,7 @@ protected void leftIconClicked(View view) {
410410
btnRecording.setVisibility(GONE);
411411
setEditableState(true);
412412
openSoftKeyboard(etInputArea);
413-
leftIconView.setImageDrawable(mLeftSecondIcon);
413+
leftIconView.setImageDrawable(mLeftDefaultIcon);
414414
if (!TextUtils.isEmpty(etInputArea.getText().toString())) {
415415
rightIconView.setVisibility(GONE);
416416
btnSend.setVisibility(VISIBLE);
@@ -542,7 +542,6 @@ public boolean onTouch(View view, MotionEvent motionEvent) {
542542
mOnChatKeyBoardListener.onRecordingAction(RecordingAction.CANCELED);
543543
}
544544
} else if (motionEvent.getAction() == MotionEvent.ACTION_MOVE) {
545-
//todo the num can be set by up layer
546545
endY = motionEvent.getRawY();
547546
if (startY - endY > Utils.dip2px(mContext, 50)) {
548547
btnRecording.setText(getResources().getString(R.string.recording_cancel));

keyboard/src/main/res/drawable/send_button_bg.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@
66
<corners android:radius="2dp"/>
77
</shape>
88
</item>
9-
10-
<item>
9+
<item android:state_enabled="true">
1110
<shape android:shape="rectangle">
1211
<solid android:color="#45C01A"/>
1312
<corners android:radius="2dp"/>
1413
</shape>
1514
</item>
15+
<item>
16+
<shape android:shape="rectangle">
17+
<solid android:color="#7745C01A"/>
18+
<corners android:radius="2dp"/>
19+
</shape>
20+
</item>
1621
</selector>

keyboard/src/main/res/layout/keyboard_bar_layout.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
android:id="@+id/et_chat"
8181
android:layout_width="match_parent"
8282
android:layout_height="wrap_content"
83+
android:textColorHint="@color/keyboard_edit_text_hint"
8384
android:layout_marginTop="6dp"
8485
android:focusable="true"
8586
android:focusableInTouchMode="false"

keyboard/src/main/res/values/colors.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
<color name="keyboard_split_line">#CFCFCF</color>
66
<color name="keyboard_emoticons_bar_item_select">#D9D9D9</color>
77
<color name="keyboard_emoticons_bar_item_normal">#FFFFFF</color>
8+
<color name="keyboard_edit_text_hint">#BBBBBB</color>
89
</resources>

0 commit comments

Comments
 (0)