Added emoji compat

This commit is contained in:
M66B 2019-04-19 14:48:08 +02:00
parent 7dd7e19d13
commit c7dcde5c6b
6 changed files with 18 additions and 5 deletions

View File

@ -112,6 +112,7 @@ dependencies {
def preference_version = "1.0.0"
def work_version = "2.0.1"
def exif_version = "1.0.0"
def emoji_version = "1.0.0"
def billingclient_version = "1.2.2"
def javamail_version = "1.6.3"
def jsoup_version = "1.11.3"
@ -169,6 +170,10 @@ dependencies {
// https://mvnrepository.com/artifact/androidx.exifinterface/exifinterface
implementation "androidx.exifinterface:exifinterface:$exif_version"
// https://mvnrepository.com/artifact/androidx.emoji
implementation "androidx.emoji:emoji:$emoji_version"
implementation "androidx.emoji:emoji-bundled:$emoji_version"
// https://developer.android.com/google/play/billing/billing_library_releases_notes
implementation "com.android.billingclient:billing:$billingclient_version"

View File

@ -38,6 +38,8 @@ import android.preference.PreferenceManager;
import android.webkit.CookieManager;
import androidx.annotation.RequiresApi;
import androidx.emoji.bundled.BundledEmojiCompatConfig;
import androidx.emoji.text.EmojiCompat;
import org.json.JSONArray;
import org.json.JSONException;
@ -91,9 +93,15 @@ public class ApplicationEx extends Application {
});
createNotificationChannels();
EmojiCompat.Config config = new BundledEmojiCompatConfig(this);
EmojiCompat.init(config);
if (Helper.hasWebView(this))
CookieManager.getInstance().setAcceptCookie(false);
MessageHelper.setSystemProperties();
Core.init(this);
}

View File

@ -4,9 +4,9 @@ import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import androidx.appcompat.widget.AppCompatEditText;
import androidx.emoji.widget.EmojiEditText;
public class EditTextCompose extends AppCompatEditText {
public class EditTextCompose extends EmojiEditText {
public EditTextCompose(Context context) {
super(context);
}

View File

@ -239,7 +239,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvSignature" />
<TextView
<androidx.emoji.widget.EmojiTextView
android:id="@+id/tvReference"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -556,7 +556,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/barrier_body" />
<TextView
<androidx.emoji.widget.EmojiTextView
android:id="@+id/tvBody"
android:layout_width="0dp"
android:layout_height="wrap_content"

View File

@ -548,7 +548,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/barrier_body" />
<TextView
<androidx.emoji.widget.EmojiTextView
android:id="@+id/tvBody"
android:layout_width="0dp"
android:layout_height="wrap_content"