Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Adding emoji compatibility, Replace TextView, EditText with EmojiTextVi… #3092

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ dependencies {
implementation 'me.everything:overscroll-decor-android:1.0.4'
implementation 'com.mikepenz:aboutlibraries:5.8.5' //5.9.0, 5.9.8, 6.0.0
implementation 'com.googlecode.mp4parser:isoparser:1.1.22'
implementation "com.android.support:support-emoji-bundled:28.0.0"

testImplementation 'junit:junit:4.12'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths"/>
<meta-data
android:name="fontProviderRequests"
android:value="Noto Color Emoji Compat" />
</provider>

<activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
import android.support.annotation.NonNull;
import android.support.design.widget.Snackbar;
import android.support.design.widget.TabLayout;
import android.support.text.emoji.EmojiCompat;
import android.support.text.emoji.bundled.BundledEmojiCompatConfig;
import android.support.text.emoji.widget.EmojiTextView;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
Expand Down Expand Up @@ -908,6 +911,10 @@ protected void onCreate(final Bundle savedInstanceState) {
inNightMode = SettingValues.isNight();
disableSwipeBackLayout();
super.onCreate(savedInstanceState);

EmojiCompat.Config config = new BundledEmojiCompatConfig(this);
EmojiCompat.init(config);

if ((getIntent().getFlags() & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) != 0) {
// Activity was brought to front and not created
finish();
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/layout/account_pop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="70dp"
Expand Down Expand Up @@ -48,7 +48,7 @@
android:orientation="horizontal"
android:paddingEnd="16dp">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/linkkarma"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -58,7 +58,7 @@
android:textSize="18sp"
android:textStyle="bold"/>

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
Expand All @@ -75,7 +75,7 @@
android:orientation="horizontal"
android:paddingEnd="16dp">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/commentkarma"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -85,7 +85,7 @@
android:textSize="18sp"
android:textStyle="bold"/>

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
Expand All @@ -94,7 +94,7 @@
android:textSize="16sp"/>
</LinearLayout>

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/moreinfo"
android:layout_width="wrap_content"
android:layout_height="48dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/account_textview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:paddingEnd="18dp"
android:layout_height="48dp">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="48dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/account_textview_white.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:paddingEnd="18dp"
android:layout_height="48dp">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="48dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_createmulti.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
android:theme="@style/Theme.AppCompat"
app:layout_scrollFlags="scroll|enterAlways">

<EditText
<android.support.text.emoji.widget.EmojiEditText
android:id="@+id/name"
android:layout_width="160dp"
android:layout_height="match_parent"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/activity_crosspost.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">

<EditText
<android.support.text.emoji.widget.EmojiEditText
android:id="@+id/titletext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -92,7 +92,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">

<EditText
<android.support.text.emoji.widget.EmojiEditText
android:id="@+id/crossposttext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -101,7 +101,7 @@
android:hint="@string/btn_crosspost" />
</android.support.design.widget.TextInputLayout>

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/suggest"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
20 changes: 10 additions & 10 deletions app/src/main/res/layout/activity_donate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
android:orientation="vertical"
android:padding="16dp">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="8dp"
Expand All @@ -39,7 +39,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/money"
android:layout_width="84dp"
android:layout_height="match_parent"
Expand All @@ -64,7 +64,7 @@
app:sl_value="4" />
</LinearLayout>

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.5"
Expand All @@ -81,15 +81,15 @@
android:paddingBottom="8dp"
android:paddingTop="16dp">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha=".6"
android:text="@string/donate_amount_ads1"
android:textColor="?attr/fontColor"
android:textSize="18sp" />

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/ads"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -98,7 +98,7 @@
android:textSize="24sp"
android:textStyle="bold" />

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.6"
Expand All @@ -111,15 +111,15 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha=".6"
android:text="@string/donate_amount_hours1"
android:textColor="?attr/fontColor"
android:textSize="18sp" />

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/hours"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -128,7 +128,7 @@
android:textSize="24sp"
android:textStyle="bold" />

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha=".6"
Expand All @@ -137,7 +137,7 @@
android:textSize="18sp" />
</LinearLayout>

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_filtercomments.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
app:srcCompat="@drawable/search"
android:tint="?attr/tintColor" />

<EditText
<android.support.text.emoji.widget.EmojiEditText
android:id="@+id/search"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_internet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
android:background="@color/md_deep_orange_500">


<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -20,7 +20,7 @@
android:textSize="18sp"
android:textStyle="bold" />

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/restart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
18 changes: 9 additions & 9 deletions app/src/main/res/layout/activity_manage_history_child.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
android:orientation="vertical"
android:padding="16dp">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/autocache_subreddits"
android:textColor="?attr/fontColor"
android:textSize="16sp" />

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha=".86"
Expand Down Expand Up @@ -52,7 +52,7 @@
android:layout_centerVertical="true"
android:orientation="vertical">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cache_wifi_only"
Expand Down Expand Up @@ -90,7 +90,7 @@
android:background="?android:selectableItemBackground"
android:padding="16dp">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/comments_depth"
Expand All @@ -114,7 +114,7 @@
android:background="?android:selectableItemBackground"
android:padding="16dp">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/comments_count"
Expand All @@ -139,14 +139,14 @@
android:orientation="vertical"
android:padding="16dp">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/autocache_time"
android:textColor="?attr/fontColor"
android:textSize="16sp" />

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha=".86"
Expand All @@ -170,7 +170,7 @@
android:orientation="vertical"
android:padding="16dp">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cache_subreddits_now"
Expand All @@ -193,7 +193,7 @@
android:orientation="vertical"
android:padding="16dp">

<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/clear_saved_subreddits"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_media.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
android:id="@+id/gifheader"
android:gravity="right|bottom"
android:weightSum="6">
<TextView
<android.support.text.emoji.widget.EmojiTextView
android:layout_width="wrap_content"
android:paddingLeft="16dp"
android:gravity="center"
Expand Down
Loading