mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
use current emoji set in message details and make text selectable
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||
android:id="@+id/details_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingTop="15dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:textIsSelectable="true"
|
||||
android:autoLink="web|email"
|
||||
style="@style/Signal.Text.Body"/>
|
||||
|
||||
</ScrollView>
|
||||
@@ -107,8 +107,12 @@ public abstract class BaseConversationItem extends LinearLayout
|
||||
} else if (!shouldInterceptClicks(messageRecord) && parent != null) {
|
||||
parent.onClick(v);
|
||||
} else if (messageRecord.isFailed()) {
|
||||
View view = View.inflate(context, R.layout.message_details_view, null);
|
||||
TextView detailsText = view.findViewById(R.id.details_text);
|
||||
detailsText.setText(messageRecord.getError());
|
||||
|
||||
AlertDialog d = new AlertDialog.Builder(context)
|
||||
.setMessage(messageRecord.getError())
|
||||
.setView(view)
|
||||
.setTitle(R.string.error)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.create();
|
||||
|
||||
@@ -6,6 +6,8 @@ import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.text.util.Linkify;
|
||||
import android.view.Menu;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.view.ActionMode;
|
||||
@@ -39,9 +41,12 @@ public abstract class MessageSelectorFragment
|
||||
}
|
||||
|
||||
protected void handleDisplayDetails(DcMsg dcMsg) {
|
||||
String infoStr = dcContext.getMsgInfo(dcMsg.getId());
|
||||
View view = View.inflate(getActivity(), R.layout.message_details_view, null);
|
||||
TextView detailsText = view.findViewById(R.id.details_text);
|
||||
detailsText.setText(dcContext.getMsgInfo(dcMsg.getId()));
|
||||
|
||||
AlertDialog d = new AlertDialog.Builder(getActivity())
|
||||
.setMessage(infoStr)
|
||||
.setView(view)
|
||||
.setPositiveButton(android.R.string.ok, null)
|
||||
.create();
|
||||
d.show();
|
||||
|
||||
Reference in New Issue
Block a user