kopia lustrzana https://github.com/ryukoposting/Signal-Android
Force custom emojis for about views.
rodzic
e0fc191883
commit
e9e2846532
|
@ -1,6 +1,7 @@
|
|||
package org.thoughtcrime.securesms.components.emoji;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.InputFilter;
|
||||
import android.util.AttributeSet;
|
||||
|
@ -27,7 +28,12 @@ public class EmojiEditText extends AppCompatEditText {
|
|||
|
||||
public EmojiEditText(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
if (!TextSecurePreferences.isSystemEmojiPreferred(getContext())) {
|
||||
|
||||
TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.EmojiTextView, 0, 0);
|
||||
boolean forceCustom = a.getBoolean(R.styleable.EmojiTextView_emoji_forceCustom, false);
|
||||
a.recycle();
|
||||
|
||||
if (forceCustom || !TextSecurePreferences.isSystemEmojiPreferred(getContext())) {
|
||||
setFilters(appendEmojiFilter(this.getFilters()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.thoughtcrime.securesms.contacts.ContactSelectionListItem xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/contact_selection_item_height"
|
||||
android:orientation="horizontal"
|
||||
|
@ -70,6 +71,7 @@
|
|||
android:textColor="@color/signal_text_secondary"
|
||||
android:textSize="14sp"
|
||||
android:fontFamily="sans-serif-light"
|
||||
app:emoji_forceCustom="true"
|
||||
tools:text="@sample/contacts.json/data/number" />
|
||||
|
||||
<TextView android:id="@+id/label"
|
||||
|
|
|
@ -38,7 +38,8 @@
|
|||
android:gravity="center"
|
||||
android:textAppearance="@style/Signal.Text.MessageRequest.Subtitle"
|
||||
tools:text="Hangin' on the web"
|
||||
app:layout_constraintTop_toBottomOf="@id/message_request_title" />
|
||||
app:layout_constraintTop_toBottomOf="@id/message_request_title"
|
||||
app:emoji_forceCustom="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message_request_subtitle"
|
||||
|
|
|
@ -43,7 +43,8 @@
|
|||
android:maxLines="1"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar"
|
||||
app:layout_constraintStart_toEndOf="@id/edit_about_emoji"
|
||||
app:layout_constraintEnd_toStartOf="@id/edit_about_clear"/>
|
||||
app:layout_constraintEnd_toStartOf="@id/edit_about_clear"
|
||||
app:emoji_forceCustom="true"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/edit_about_clear"
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toEndOf="@+id/recipient_avatar"
|
||||
app:layout_constraintTop_toBottomOf="@+id/recipient_name"
|
||||
app:emoji_forceCustom="true"
|
||||
tools:text="Hangin' around the web" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -192,6 +192,7 @@
|
|||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/manage_profile_about_icon"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:emoji_forceCustom="true"
|
||||
tools:text="Photographer for the Daily Bugle"/>
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
android:textColor="@color/signal_text_secondary"
|
||||
style="@style/Signal.Text.Body"
|
||||
app:layout_constraintTop_toBottomOf="@id/rbs_full_name"
|
||||
app:emoji_forceCustom="true"
|
||||
tools:text="🕷🕷🕷Hangin' on the web🕷🕷"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
android:textAppearance="@style/Signal.Text.Body"
|
||||
android:textColor="@color/signal_text_secondary"
|
||||
android:gravity="center"
|
||||
app:emoji_forceCustom="true"
|
||||
tools:text="Hangin' around the web" />
|
||||
|
||||
<TextView
|
||||
|
|
Ładowanie…
Reference in New Issue