mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01:00
parent
ca31e5e967
commit
c907c62c3c
@ -160,6 +160,8 @@ dependencies {
|
||||
implementation 'com.webianks.library:popup-bubble:1.0.5'
|
||||
|
||||
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
||||
implementation 'com.kevalpatel2106:emoticongifkeyboard:1.1'
|
||||
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation ('com.android.support.test.espresso:espresso-core:3.0.1', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
|
@ -26,6 +26,7 @@ import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.kevalpatel2106.emoticongifkeyboard.widget.EmoticonTextView;
|
||||
import com.nextcloud.talk.R;
|
||||
import com.nextcloud.talk.application.NextcloudTalkApplication;
|
||||
import com.nextcloud.talk.models.database.UserEntity;
|
||||
@ -50,7 +51,7 @@ public class MagicIncomingTextMessageViewHolder
|
||||
TextView messageAuthor;
|
||||
|
||||
@BindView(R.id.messageText)
|
||||
TextView messageText;
|
||||
EmoticonTextView messageText;
|
||||
|
||||
@Inject
|
||||
UserUtils userUtils;
|
||||
|
@ -23,8 +23,8 @@ package com.nextcloud.talk.adapters.messages;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.kevalpatel2106.emoticongifkeyboard.widget.EmoticonTextView;
|
||||
import com.nextcloud.talk.R;
|
||||
import com.nextcloud.talk.application.NextcloudTalkApplication;
|
||||
import com.nextcloud.talk.models.database.UserEntity;
|
||||
@ -44,7 +44,7 @@ import butterknife.ButterKnife;
|
||||
@AutoInjector(NextcloudTalkApplication.class)
|
||||
public class MagicOutcomingTextMessageViewHolder extends MessageHolders.OutcomingTextMessageViewHolder<ChatMessage> {
|
||||
@BindView(R.id.messageText)
|
||||
TextView messageText;
|
||||
EmoticonTextView messageText;
|
||||
|
||||
@Inject
|
||||
UserUtils userUtils;
|
||||
|
@ -75,11 +75,11 @@ import com.nextcloud.talk.models.json.rooms.RoomOverall;
|
||||
import com.nextcloud.talk.models.json.rooms.RoomsOverall;
|
||||
import com.nextcloud.talk.presenters.MentionAutocompletePresenter;
|
||||
import com.nextcloud.talk.utils.ApiUtils;
|
||||
import com.nextcloud.talk.utils.singletons.ApplicationWideCurrentRoomHolder;
|
||||
import com.nextcloud.talk.utils.KeyboardUtils;
|
||||
import com.nextcloud.talk.utils.bundle.BundleKeys;
|
||||
import com.nextcloud.talk.utils.database.user.UserUtils;
|
||||
import com.nextcloud.talk.utils.glide.GlideApp;
|
||||
import com.nextcloud.talk.utils.singletons.ApplicationWideCurrentRoomHolder;
|
||||
import com.otaliastudios.autocomplete.Autocomplete;
|
||||
import com.otaliastudios.autocomplete.AutocompleteCallback;
|
||||
import com.otaliastudios.autocomplete.AutocompletePresenter;
|
||||
@ -92,6 +92,7 @@ import com.stfalcon.chatkit.messages.MessagesListAdapter;
|
||||
import com.stfalcon.chatkit.utils.DateFormatter;
|
||||
import com.webianks.library.PopupBubble;
|
||||
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
import org.parceler.Parcels;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -374,7 +375,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
|
||||
messageInputView.getInputEditText().setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
||||
messageInputView.setInputListener(input -> {
|
||||
sendMessage(input.toString(), 1);
|
||||
sendMessage(StringEscapeUtils.escapeJava(input.toString()), 1);
|
||||
return true;
|
||||
});
|
||||
|
||||
|
@ -26,6 +26,7 @@ import com.nextcloud.talk.utils.ApiUtils;
|
||||
import com.stfalcon.chatkit.commons.models.IMessage;
|
||||
import com.stfalcon.chatkit.commons.models.IUser;
|
||||
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
import org.parceler.Parcel;
|
||||
|
||||
import java.util.Date;
|
||||
@ -113,6 +114,7 @@ public class ChatMessage implements IMessage {
|
||||
}
|
||||
}
|
||||
|
||||
return message;
|
||||
|
||||
return StringEscapeUtils.unescapeJava(message);
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="12sp"/>
|
||||
|
||||
<TextView
|
||||
<com.kevalpatel2106.emoticongifkeyboard.widget.EmoticonTextView
|
||||
android:id="@id/messageText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -42,7 +42,7 @@
|
||||
app:flexWrap="wrap"
|
||||
app:justifyContent="flex_end">
|
||||
|
||||
<TextView
|
||||
<com.kevalpatel2106.emoticongifkeyboard.widget.EmoticonTextView
|
||||
android:id="@id/messageText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
67
app/src/main/res/layout/view_message_input.xml
Normal file
67
app/src/main/res/layout/view_message_input.xml
Normal file
@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Nextcloud Talk application
|
||||
~
|
||||
~ @author Mario Danic
|
||||
~ Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<merge
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/attachmentButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"/>
|
||||
|
||||
<android.support.v4.widget.Space
|
||||
android:id="@id/attachmentButtonSpace"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_toEndOf="@id/attachmentButton"
|
||||
android:layout_toRightOf="@id/attachmentButton"/>
|
||||
|
||||
<com.kevalpatel2106.emoticongifkeyboard.widget.EmoticonEditText
|
||||
android:id="@id/messageInput"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@id/attachmentButtonSpace"
|
||||
android:layout_toLeftOf="@id/sendButtonSpace"
|
||||
android:layout_toRightOf="@id/attachmentButtonSpace"
|
||||
android:layout_toStartOf="@id/sendButtonSpace"
|
||||
android:inputType="textAutoCorrect|textAutoComplete|textMultiLine|textCapSentences"/>
|
||||
|
||||
<android.support.v4.widget.Space
|
||||
android:id="@id/sendButtonSpace"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_toLeftOf="@id/messageSendButton"
|
||||
android:layout_toStartOf="@id/messageSendButton"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/messageSendButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"/>
|
||||
|
||||
</merge>
|
Loading…
Reference in New Issue
Block a user