EmojiCompat support (#600)

* Add EmojiCompat

* EmojiCompat doesn' replace all emojis anymore

* This app should be now capable of loading a EmojiCompat-font located in a file somewhere inside the device's storage

* Should now replace all emojis

* Add EmojiCompat support to EditTextTyped

* Provide EmojiCompat fonts

* The app won't crash anymore when no emoji font is available.
Emoji font should now be located at [Private external app directory]/files/EmojiCompat.ttf

* Removed BundledEmojiCompat dependency

Since this EmojiCompat-implementation does not rely on BundledEmojiCompat, there's no reason to have it enabled.

* Update EditTextTyped.kt

Since connection isn't assigned to (I tried doing so), it can be declared final/val again.

* Update README.md

* Add some non-working emoji preferences

* Add a short font list for testing

* Finished implementation

* Add Twemoji to font list

* Update documentation, more comments

* Delete AssetEmojiCompat which is obsolete now

* Update the font list

* Update the font list

* Fix font list & add Exception handling for malformed JSON files (hopefully)

* More fixes. It should work now...

* Removed AssetEmojiCompat (again)

* Add most of the changes

* Improved the EmojiCompat dialog's style

* The font list is now based on a static layout without external files

* Re-add the real font URL for Twemoji

* Emoji-font captions are now translatable

* Removed one unused String (loading)

* Removed emoji fonts from this repo

* Applied changes from the PR change requests

* The correct emoji font will be selected after cancelling a change

* Add details on the EmojiCompat fonts available (not shown yet)

* Add licensing information on Twemoji and Blobmoji

* Reworked some strings

* Moved FileEmojiCompat to its own library

* Update FileEmojiCompat to the latest version (1.0.3)

* EmojiCompat bug should be fixed

* Better handling of failed downloads

* Removed one TODO

Signed-off-by: Constantin A <10349490+C1710@users.noreply.github.com>

* Update emoji attribution strings

Signed-off-by: Constantin A <10349490+C1710@users.noreply.github.com>

* Fixed some misspelled strings

Signed-off-by: Constantin A <10349490+C1710@users.noreply.github.com>
This commit is contained in:
Constantin A 2018-05-10 11:16:56 +02:00 committed by Konrad Pozniak
commit 1108652823
34 changed files with 1253 additions and 34 deletions

View file

@ -0,0 +1,4 @@
<vector android:height="40dp" android:viewportHeight="24.0"
android:viewportWidth="24.0" android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M7,10l5,5 5,-5z"/>
</vector>

View file

@ -0,0 +1,4 @@
<vector android:height="40dp" android:viewportHeight="24.0"
android:viewportWidth="24.0" android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M7,14l5,-5 5,5z"/>
</vector>

View file

@ -0,0 +1,11 @@
<vector android:height="40dp" android:viewportHeight="128"
android:viewportWidth="128" android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FCC21B" android:pathData="M63.79,8.64C1.48,8.64 0,78.5 0,92.33c0,13.83 28.56,25.03 63.79,25.03c35.24,0 63.79,-11.21 63.79,-25.03C127.58,78.5 126.11,8.64 63.79,8.64z"/>
<path android:fillColor="#ED6C30" android:pathData="M96.46,70.26c-3.09,-2.09 -6.98,-0.71 -10.42,0c-9.58,1.98 -18,2.06 -22.04,2.06s-12.46,-0.08 -22.04,-2.06c-3.44,-0.71 -7.33,-2.09 -10.42,0c-3.92,2.65 -1.03,12.15 5.14,18.57c3.73,3.88 12.61,11.41 27.32,11.41c14.71,0 23.59,-7.53 27.32,-11.41C97.49,82.41 100.37,72.91 96.46,70.26z"/>
<path android:fillAlpha="0.82304526" android:fillColor="#34d400"
android:pathData="m64,40.154c-5.706,0.003 -20.717,-3.087 -30.093,-1.719 -9.376,1.368 -17.895,3.369 -24.948,5.915 -2.592,5.889 -4.435,11.954 -5.744,17.762 7.247,0.986 16.639,1.771 27.291,2.311 10.652,0.539 23.001,-1.063 34.849,-1.062 11.849,0.001 22.527,1.644 32.62,1.175 10.093,-0.47 19.163,-1.156 26.484,-2.026C123.126,56.491 121.215,50.184 118.5,44.076 111.438,41.604 102.976,39.666 93.698,38.345 84.419,37.024 69.706,40.151 64,40.154Z"
android:strokeAlpha="1" android:strokeColor="#00000000"
android:strokeLineCap="butt" android:strokeLineJoin="miter" android:strokeWidth="0.97736496"/>
<path android:fillAlpha="1" android:fillColor="#272727" android:pathData="M42.21,61.3c-4.49,0.04 -8.17,-4.27 -8.22,-9.62c-0.05,-5.37 3.55,-9.75 8.04,-9.79c4.48,-0.04 8.17,4.27 8.22,9.64C50.3,56.88 46.7,61.25 42.21,61.3z"/>
<path android:fillAlpha="1" android:fillColor="#272727" android:pathData="M86.32,61.3c4.48,-0.01 8.11,-4.36 8.1,-9.71c-0.01,-5.37 -3.66,-9.7 -8.14,-9.69c-4.49,0.01 -8.13,4.36 -8.12,9.73C78.18,56.98 81.83,61.31 86.32,61.3z"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,2C6.47,2 2,6.47 2,12s4.47,10 10,10 10,-4.47 10,-10S17.53,2 12,2zM17,15.59L15.59,17 12,13.41 8.41,17 7,15.59 10.59,12 7,8.41 8.41,7 12,10.59 15.59,7 17,8.41 13.41,12 17,15.59z"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector android:height="40dp" android:viewportHeight="36"
android:viewportWidth="36" android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFCB4C" android:pathData="M18,17.018m-17,0a17,17 0,1 1,34 0a17,17 0,1 1,-34 0"/>
<path android:fillColor="#65471B" android:pathData="M14.524,21.036c-0.145,-0.116 -0.258,-0.274 -0.312,-0.464 -0.134,-0.46 0.13,-0.918 0.59,-1.021 4.528,-1.021 7.577,1.363 7.706,1.465 0.384,0.306 0.459,0.845 0.173,1.205 -0.286,0.358 -0.828,0.401 -1.211,0.097 -0.11,-0.084 -2.523,-1.923 -6.182,-1.098 -0.274,0.061 -0.554,-0.016 -0.764,-0.184z"/>
<path android:fillColor="#65471B" android:pathData="M10.994,11.174a2.125,2.656 0,1 0,4.25 0a2.125,2.656 0,1 0,-4.25 0z"/>
<path android:fillColor="#65471B" android:pathData="M22.25,12.236a2.125,2.656 0,1 0,4.25 0a2.125,2.656 0,1 0,-4.25 0z"/>
<path android:fillColor="#F19020" android:pathData="M17.276,35.149s1.265,-0.411 1.429,-1.352c0.173,-0.972 -0.624,-1.167 -0.624,-1.167s1.041,-0.208 1.172,-1.376c0.123,-1.101 -0.861,-1.363 -0.861,-1.363s0.97,-0.4 1.016,-1.539c0.038,-0.959 -0.995,-1.428 -0.995,-1.428s5.038,-1.221 5.556,-1.341c0.516,-0.12 1.32,-0.615 1.069,-1.694 -0.249,-1.08 -1.204,-1.118 -1.697,-1.003 -0.494,0.115 -6.744,1.566 -8.9,2.068l-1.439,0.334c-0.54,0.127 -0.785,-0.11 -0.404,-0.512 0.508,-0.536 0.833,-1.129 0.946,-2.113 0.119,-1.035 -0.232,-2.313 -0.433,-2.809 -0.374,-0.921 -1.005,-1.649 -1.734,-1.899 -1.137,-0.39 -1.945,0.321 -1.542,1.561 0.604,1.854 0.208,3.375 -0.833,4.293 -2.449,2.157 -3.588,3.695 -2.83,6.973 0.828,3.575 4.377,5.876 7.952,5.048l3.152,-0.681z"/>
<path android:fillColor="#65471B" android:pathData="M9.296,6.351c-0.164,-0.088 -0.303,-0.224 -0.391,-0.399 -0.216,-0.428 -0.04,-0.927 0.393,-1.112 4.266,-1.831 7.699,-0.043 7.843,0.034 0.433,0.231 0.608,0.747 0.391,1.154 -0.216,0.405 -0.74,0.546 -1.173,0.318 -0.123,-0.063 -2.832,-1.432 -6.278,0.047 -0.257,0.109 -0.547,0.085 -0.785,-0.042zM21.431,10.101c-0.156,-0.098 -0.286,-0.243 -0.362,-0.424 -0.187,-0.442 0.023,-0.927 0.468,-1.084 4.381,-1.536 7.685,0.48 7.823,0.567 0.415,0.26 0.555,0.787 0.312,1.178 -0.242,0.39 -0.776,0.495 -1.191,0.238 -0.12,-0.072 -2.727,-1.621 -6.267,-0.379 -0.266,0.091 -0.553,0.046 -0.783,-0.096z"/>
</vector>

View file

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="72dp">
<ImageButton
android:id="@+id/about_blobmoji_expand"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_margin="12dp"
android:background="?attr/selectableItemBackgroundBorderless"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_arrow_drop_down_black_24dp"
android:tint="@color/colorPrimary"
app:layout_constraintVertical_bias="0.5"
android:focusable="true"
android:contentDescription="@android:string/cancel" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="72dp"
android:layout_marginEnd="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:text="@string/license_blobmoji"
android:textColor="?android:textColorPrimary"
android:textSize="16sp"/>
</android.support.constraint.ConstraintLayout>
<TextView
android:id="@+id/license_apache"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Apache license 2.0"
android:autoLink="web"
android:visibility="gone"
android:layout_margin="16dp"
android:textSize="14sp"
android:textColor="?android:textColorSecondary"/>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="88dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="72dp"
android:layout_marginEnd="16dp"
android:autoLink="web"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:text="@string/license_twemoji"
android:textColor="?android:textColorPrimary"
android:textSize="16sp"/>
</android.support.constraint.ConstraintLayout>
</merge>

View file

@ -31,7 +31,7 @@
android:gravity="center_vertical"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textIsSelectable="true"
android:textStyle="bold" />
android:textStyle="bold"/>
<TextView
android:layout_width="match_parent"
@ -42,7 +42,7 @@
android:text="@string/about_tusky_license"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textIsSelectable="true" />
android:textIsSelectable="true"/>
<TextView
android:id="@+id/projectURL_TV"
@ -80,6 +80,18 @@
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@android:color/white" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="web"
android:lineSpacingMultiplier="1.2"
android:padding="@dimen/text_content_margin"
android:text="@string/about_emoji"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textIsSelectable="true" />
<include layout="@layout/about_emoji" />
</LinearLayout>
</ScrollView>

View file

@ -80,7 +80,7 @@
app:layout_constraintEnd_toEndOf="@id/follow_btn"
app:layout_constraintTop_toBottomOf="@id/follow_btn" />
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/account_display_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -116,7 +116,7 @@
app:srcCompat="@drawable/reblog_disabled_light"
tools:visibility="visible" />
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/account_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -48,7 +48,7 @@
tools:text="Reply to @username"
tools:visibility="visible" />
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/composeReplyContentView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -70,7 +70,7 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<EditText
<android.support.text.emoji.widget.EmojiEditText
android:id="@+id/composeContentWarningField"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -21,7 +21,7 @@
android:fadeScrollbars="false"
android:background="?attr/report_status_background_color" />
<EditText
<android.support.text.emoji.widget.EmojiEditText
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"

View file

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_marginTop="20dp">
<LinearLayout
android:id="@+id/emoji_font_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include
android:id="@+id/item_blobmoji"
layout="@layout/item_emoji_pref" />
<include
android:id="@+id/item_twemoji"
layout="@layout/item_emoji_pref"/>
<include
android:id="@+id/item_nomoji"
layout="@layout/item_emoji_pref" />
</LinearLayout>
<!--There's a short explanation that you'll need to download the emoji fonts first-->
<TextView
android:id="@+id/emoji_download_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/emoji_font_list"
android:paddingBottom="24dp"
android:paddingTop="20dp"
android:paddingEnd="24dp"
android:paddingStart="24dp"
android:text="@string/download_fonts"
android:textColor="?android:attr/textColorSecondary"/>
</android.support.constraint.ConstraintLayout>

View file

@ -22,7 +22,7 @@
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/account_display_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -22,7 +22,9 @@
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
<!--TODO: Check if this needs emoji support-->
<!--FIXME: The placeholder texts seem to be swapped-->
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/display_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -38,7 +38,7 @@
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/blocked_user_display_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/emojicompat_container"
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="?attr/selectableItemBackground"
xmlns:tools="http://schemas.android.com/tools">
<!--This is a thumbnail picture-->
<ImageView
android:id="@+id/emojicompat_thumb"
android:layout_width="48dp"
android:layout_height="48dp"
android:padding="4dp"
android:layout_marginStart="16dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:srcCompat="@drawable/ic_emoji_24dp"/>
<!--This is the font's name-->
<TextView
android:id="@+id/emojicompat_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="72dp"
android:layout_marginTop="8dp"
tools:text="@string/system_default"
android:textColor="?android:textColorPrimary"
android:textSize="?attr/status_text_medium"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!--A short caption...-->
<TextView
android:id="@+id/emojicompat_caption"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="72dp"
tools:text=""
app:layout_constraintTop_toBottomOf="@id/emojicompat_name"
app:layout_constraintStart_toStartOf="@id/emojicompat_name"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintEnd_toEndOf="parent"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"/>
<!--This progress bar is shown while the font is downloading.-->
<ProgressBar
android:id="@+id/emojicompat_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="72dp"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/emojicompat_name"
app:layout_constraintTop_toBottomOf="@id/emojicompat_name"
android:indeterminate="false"
android:visibility="gone"/>
<!--Click on it and the font will be downloaded!-->
<ImageButton
android:id="@+id/emojicompat_download"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_margin="12dp"
android:background="?attr/selectableItemBackgroundBorderless"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_file_download_black_24dp"
android:tint="@color/colorPrimary"
app:layout_constraintVertical_bias="0.5"
android:focusable="true"
android:contentDescription="@string/download_fonts"
android:visibility="gone"/>
<!--TODO: enable this button again-->
<!--You should be able to cancel the download-->
<ImageButton
android:id="@+id/emojicompat_download_cancel"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_margin="12dp"
android:background="?attr/selectableItemBackgroundBorderless"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_cancel_black_24dp"
android:tint="@color/colorPrimary"
app:layout_constraintVertical_bias="0.5"
android:focusable="true"
android:contentDescription="@android:string/cancel"
android:visibility="gone"/>
<!--You'll probably want to select an emoji font, don't you?-->
<!--RadioButtons have a very strange behavior when it comes to their size.
That's why the width is set to such an unusual value.-->
<RadioButton
android:id="@+id/emojicompat_radio"
android:layout_width="52dp"
android:layout_height="72dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/emojicompat_name"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHorizontal_bias="1"
android:visibility="visible" />
</android.support.constraint.ConstraintLayout>

View file

@ -38,7 +38,7 @@
android:scaleType="fitCenter"
android:textSize="?attr/status_text_medium" />
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/notification_display_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -25,7 +25,7 @@
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/follow_request_display_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -39,7 +39,7 @@
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/muted_user_display_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -5,7 +5,7 @@
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/content"
android:layout_width="0dp"
android:layout_height="wrap_content"

View file

@ -11,7 +11,7 @@
android:paddingLeft="14dp"
android:paddingRight="14dp">
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status_reblogged"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -54,7 +54,7 @@
android:paddingBottom="4dp"
android:paddingTop="@dimen/status_avatar_padding">
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status_display_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -90,7 +90,7 @@
android:textSize="?attr/status_text_medium"
tools:text="13:37" />
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status_content_warning_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -121,7 +121,7 @@
android:visibility="gone" />
</RelativeLayout>
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -247,7 +247,7 @@
app:layout_constraintTop_toTopOf="@+id/status_media_preview_container"
app:srcCompat="@drawable/ic_eye_24dp" />
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status_sensitive_media_warning"
android:layout_width="0dp"
android:layout_height="0dp"
@ -265,7 +265,8 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
<!--TODO: Check if this needs emoji support-->
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status_media_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -32,7 +32,7 @@
android:minHeight="48dp"
android:orientation="vertical">
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status_display_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -56,7 +56,7 @@
</LinearLayout>
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status_content_warning_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -85,7 +85,7 @@
android:textOn="@string/status_content_warning_show_less"
android:textSize="?attr/status_text_large" />
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -123,7 +123,8 @@
android:paddingRight="6dp"
android:paddingTop="6dp">
<TextView
<!--TODO: check if this needs emoji support-->
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/card_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -134,7 +135,8 @@
android:textColor="?android:textColorPrimary"
android:textSize="?attr/status_text_medium" />
<TextView
<!--TODO: Check if this needs emoji support-->
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/card_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -269,7 +271,8 @@
app:layout_constraintTop_toTopOf="@+id/status_media_preview_container"
app:srcCompat="@drawable/ic_eye_24dp" />
<TextView
<!--TODO: Check if this needs emoji support-->
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status_sensitive_media_warning"
android:layout_width="0dp"
android:layout_height="0dp"
@ -287,7 +290,8 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
<!--TODO: Check if this needs emoji support-->
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status_media_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -8,6 +8,7 @@
android:paddingLeft="14dp"
android:paddingRight="14dp">
<!--TODO: Check if this needs emoji support-->
<TextView
android:id="@+id/notification_top_text"
android:layout_width="wrap_content"
@ -32,7 +33,7 @@
android:layout_toEndOf="@+id/notification_status_avatar"
android:paddingBottom="4dp">
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status_display_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -71,7 +72,7 @@
</RelativeLayout>
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/notification_content_warning_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -103,7 +104,7 @@
android:textOn="@string/status_content_warning_show_less"
android:textSize="?attr/status_text_medium" />
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/notification_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -274,5 +274,24 @@
<string name="expand_collapse_all_statuses">Alle Beiträge aus/einklappen</string>
<string name="action_compose_shortcut">Antworten</string>
<string name="performing_lookup_title">Nachschlagen…</string>
<string name="emoji_style">Emoji-Stil</string>
<string name="system_default">System-Standard</string>
<string name="download_fonts">Du musst diese Emoji-Sets zunächst herunterladen.</string>
<string name="restart_required">App-Neustart erforderlich</string>
<string name="restart_emoji">Du musst Tusky neustarten um die Änderungen anzuwenden</string>
<string name="later">Später</string>
<string name="restart">Neustarten</string>
<string name="caption_systememoji">Die Standard-Emojis deines Geräts</string>
<string name="caption_blobmoji">Ein EmojiSet, das auf den "Blob"Emojis aus Android 4.47.1 basiert</string>
<string name="caption_twemoji">Die Standard-Emojis von Mastodon</string>
<string name="about_emoji">
Tusky benutzt die folgenden Emoji-Schriftarten:\n
Twemoji von Twitter - https://github.com/twitter/Twemoji\n
Blobmoji von C1710, basierend auf Noto-Emoji - https://github.com/c1710/Blobmoji\n
Twemoji wurde auf die Nutzung mit der EmojiCompat-Bibliothek angepasst.
</string>
<string name="license_blobmoji">Blobmoji ist lizenziert nach der Apache 2.0-Lizenz</string>
<string name="license_twemoji">Twemoji ist als CC-BY-4.0 lizenziert - https://creativecommons.org/licenses/by/4.0/</string>
<string name="download_failed">Download fehlgeschlagen.</string>
</resources>

View file

@ -310,7 +310,26 @@
<string name="error_no_custom_emojis">Your instance %s does not have any custom emojis</string>
<string name="copy_to_clipboard_success">Copied to clipboard</string>
<string name="emoji_style">Emoji style</string>
<string name="system_default">System default</string>
<string name="download_fonts">You\'ll need to download these emoji sets first</string>
<string name="performing_lookup_title">Performing lookup...</string>
<string name="expand_collapse_all_statuses">Expand/Collapse all statuses</string>
<string name="restart_required">App restart required</string>
<string name="restart_emoji">You\'ll need to restart Tusky in order to apply these changes</string>
<string name="later">Later</string>
<string name="restart">Restart</string>
<string name="caption_systememoji">Your device\'s default emoji set</string>
<string name="caption_blobmoji">An emoji set based on the Blob emojis known from Android 4.47.1</string>
<string name="caption_twemoji">Mastodon\'s standard emoji set</string>
<string name="about_emoji">
Tusky uses the following emoji sets:\n
Twemoji by Twitter - https://github.com/twitter/Twemoji\n
Blobmoji by C1710, based on Noto-Emoji - https://github.com/c1710/Blobmoji\n
Twemoji has been modified in order to use it with the EmojiCompat library
</string>
<string name="license_blobmoji">Blobmoji is licensed under the Apache license 2.0</string>
<string name="license_twemoji">Twemoji is licensed as CC-BY 4.0 - https://creativecommons.org/licenses/by/4.0/</string>
<string name="download_failed">Download failed</string>
</resources>

View file

@ -12,6 +12,12 @@
android:summary="%s"
android:title="@string/pref_title_app_theme" />
<com.keylesspalace.tusky.EmojiPreference
android:defaultValue="@string/system_default"
android:key="emojiCompat"
android:summary="@string/system_default"
android:title="@string/emoji_style"/>
<ListPreference
android:defaultValue="medium"
android:entries="@array/status_text_size_names"