Browse Source

1.修改IM样式

王鹏鹏 2 years ago
parent
commit
9864d725ae

+ 2 - 0
.idea/misc.xml

@@ -269,6 +269,8 @@
         <entry key="..\:/workspace/hcp-pad/tuichat/src/main/res/drawable/my_cursor.xml" value="0.155" />
         <entry key="..\:/workspace/hcp-pad/tuichat/src/main/res/layout/chat_fragment.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pad/tuichat/src/main/res/layout/chat_input_layout.xml" value="0.23697916666666666" />
+        <entry key="..\:/workspace/hcp-pad/tuichat/src/main/res/layout/chat_inputmore_fragment.xml" value="0.23697916666666666" />
+        <entry key="..\:/workspace/hcp-pad/tuichat/src/main/res/layout/chat_inputmore_layout.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pad/tuichat/src/main/res/layout/chat_layout.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pad/tuichat/src/main/res/layout/reply_preview_layout.xml" value="0.536" />
         <entry key="..\:/workspace/hcp-pad/tuigift/src/main/res/drawable/tuigift_bg_bottom_dialog.xml" value="0.2265" />

+ 20 - 20
tuichat/src/main/java/com/tencent/qcloud/tuikit/tuichat/classicui/setting/ChatLayoutSetting.java

@@ -193,26 +193,26 @@ public class ChatLayoutSetting {
 
         // 增加一个欢迎提示富文本
         // Add a welcome prompt with rich text
-        if (TUIChatConfigs.getConfigs().getGeneralConfig().isEnableWelcomeCustomMessage()) {
-            InputMoreActionUnit unit = new InputMoreActionUnit() {};
-            unit.setIconResId(R.drawable.custom);
-            unit.setName(mContext.getString(R.string.test_custom_action));
-            unit.setActionId(CustomHelloMessage.CUSTOM_HELLO_ACTION_ID);
-            unit.setPriority(10);
-            unit.setOnClickListener(unit.new OnActionClickListener() {
-                @Override
-                public void onClick() {
-                    Gson gson = new Gson();
-                    CustomHelloMessage customHelloMessage = new CustomHelloMessage();
-                    customHelloMessage.version = TUIChatConstants.version;
-
-                    String data = gson.toJson(customHelloMessage);
-                    TUIMessageBean info = ChatMessageBuilder.buildCustomMessage(data, customHelloMessage.text, customHelloMessage.text.getBytes());
-                    layout.sendMessage(info, false);
-                }
-            });
-            inputView.addAction(unit);
-        }
+//        if (TUIChatConfigs.getConfigs().getGeneralConfig().isEnableWelcomeCustomMessage()) {
+//            InputMoreActionUnit unit = new InputMoreActionUnit() {};
+//            unit.setIconResId(R.drawable.custom);
+//            unit.setName(mContext.getString(R.string.test_custom_action));
+//            unit.setActionId(CustomHelloMessage.CUSTOM_HELLO_ACTION_ID);
+//            unit.setPriority(10);
+//            unit.setOnClickListener(unit.new OnActionClickListener() {
+//                @Override
+//                public void onClick() {
+//                    Gson gson = new Gson();
+//                    CustomHelloMessage customHelloMessage = new CustomHelloMessage();
+//                    customHelloMessage.version = TUIChatConstants.version;
+//
+//                    String data = gson.toJson(customHelloMessage);
+//                    TUIMessageBean info = ChatMessageBuilder.buildCustomMessage(data, customHelloMessage.text, customHelloMessage.text.getBytes());
+//                    layout.sendMessage(info, false);
+//                }
+//            });
+//            inputView.addAction(unit);
+//        }
     }
 
     //    public static class CustomInputFragment extends BaseInputFragment {

+ 25 - 25
tuichat/src/main/java/com/tencent/qcloud/tuikit/tuichat/classicui/widget/input/InputView.java

@@ -1273,31 +1273,31 @@ public class InputView extends LinearLayout implements View.OnClickListener, Tex
             mInputMoreActionList.add(actionUnit);
         }
 
-        if (!mVideoRecordDisable) {
-            actionUnit = new InputMoreActionUnit() {
-                @Override
-                public void onAction(String chatInfoId, int chatType) {
-                    startVideoRecordCheckPermission();
-                }
-            };
-            actionUnit.setIconResId(R.drawable.ic_more_video);
-            actionUnit.setPriority(800);
-            actionUnit.setName(getString(R.string.video));
-            mInputMoreActionList.add(actionUnit);
-        }
-
-        if (!mSendFileDisable) {
-            actionUnit = new InputMoreActionUnit() {
-                @Override
-                public void onAction(String chatInfoId, int chatType) {
-                    startSendFile();
-                }
-            };
-            actionUnit.setIconResId(R.drawable.ic_more_file);
-            actionUnit.setName(getString(R.string.file));
-            actionUnit.setPriority(700);
-            mInputMoreActionList.add(actionUnit);
-        }
+//        if (!mVideoRecordDisable) {
+//            actionUnit = new InputMoreActionUnit() {
+//                @Override
+//                public void onAction(String chatInfoId, int chatType) {
+//                    startVideoRecordCheckPermission();
+//                }
+//            };
+//            actionUnit.setIconResId(R.drawable.ic_more_video);
+//            actionUnit.setPriority(800);
+//            actionUnit.setName(getString(R.string.video));
+//            mInputMoreActionList.add(actionUnit);
+//        }
+
+//        if (!mSendFileDisable) {
+//            actionUnit = new InputMoreActionUnit() {
+//                @Override
+//                public void onAction(String chatInfoId, int chatType) {
+//                    startSendFile();
+//                }
+//            };
+//            actionUnit.setIconResId(R.drawable.ic_more_file);
+//            actionUnit.setName(getString(R.string.file));
+//            actionUnit.setPriority(700);
+//            mInputMoreActionList.add(actionUnit);
+//        }
 
         mInputMoreActionList.addAll(mInputMoreCustomActionList);
 

BIN
tuichat/src/main/res/drawable-xxhdpi/ic_more_camera.png


BIN
tuichat/src/main/res/drawable-xxhdpi/ic_more_picture.png


+ 31 - 30
tuichat/src/main/res/values/strings.xml

@@ -1,43 +1,44 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
 
-    <string name="pic">Album</string>
-    <string name="photo">Take Photo</string>
-    <string name="video">Record Video</string>
-    <string name="file">File</string>
+    <string name="pic">图片</string>
+    <string name="photo">拍照</string>
+    <string name="video">摄像</string>
+    <string name="file">文件</string>
 
-    <string name="release_end">Release to Send</string>
-    <string name="hold_say">Hold to Talk</string>
+    <string name="release_end">松开结束</string>
+    <string name="hold_say">按住说话</string>
 
-    <string name="copy_action">Copy</string>
-    <string name="translate_action">Translate</string>
-    <string name="delete_action">Delete</string>
-    <string name="revoke_action">Recall</string>
-    <string name="resend_action">Resend</string>
-    <string name="hide_action">Hide</string>
+    <string name="copy_action">复制</string>
+    <string name="translate_action">翻译</string>
+    <string name="delete_action">删除</string>
+    <string name="revoke_action">撤回</string>
+    <string name="resend_action">重发</string>
+    <string name="hide_action">隐藏</string>
 
-    <string name="copy_success_tip">Copy Success</string>
+    <string name="copy_success_tip">复制成功</string>
 
-    <string name="chat_message_detail">Message details</string>
+    <string name="chat_message_detail">消息详情</string>
 
     <!-- 消息转发 -->
 
-    <string name="titlebar_back">Back</string>
-    <string name="forward_tip">please select message!</string>
-    <string name="forward_mode_onebyone">One-by-one forward</string>
-    <string name="forward_mode_merge">Combine and forward</string>
-    <string name="forward_button">Forward</string>
-    <string name="reply_button">Reply</string>
-    <string name="quote_button">Quote</string>
-    <string name="info_button">Info</string>
-    <string name="delete_button">Delete</string>
-    <string name="chat_delete_msg_tip">Delete now</string>
-
-    <string name="forward_chats">Group Chat History</string>
-    <string name="and_text">and</string>
-    <string name="forward_chats_c2c">Chat History</string>
-    <string name="forward_compatible_text">Combine and Forward is not available. Upgrade to the latest version first.</string>
-    <string name="forward_chat_record">Chat Record</string>
+    <string name="titlebar_back">返回</string>
+    <string name="forward_tip">请选择要操作的消息!</string>
+    <string name="forward_mode_onebyone">逐条转发</string>
+    <string name="forward_mode_merge">合并转发</string>
+    <string name="forward_button">转发</string>
+    <string name="reply_button">回复</string>
+    <string name="quote_button">引用</string>
+    <string name="info_button">详情</string>
+    <string name="delete_button">删除</string>
+    <string name="chat_delete_msg_tip">确定删除已选消息</string>
+
+    <string name="forward_chats">群聊的聊天记录</string>
+    <string name="and_text">和</string>
+    <string name="forward_chats_c2c">的聊天记录</string>
+    <string name="forward_compatible_text">不支持合并转发消息,请升级到新版本。</string>
+
+   <string name="forward_chat_record">Chat Record</string>
 
     <string name="forward_failed_tip">Unable to forward failed messages.</string>
     <string name="forward_group_note_or_poll_failed_tip">Unable to forward group-note or poll messages.</string>