aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-03-17 22:04:31 +0100
committerChristian Schneppe <christian@pix-art.de>2017-03-17 22:04:31 +0100
commit3edc8a6ae32826403707a9576a39f84d600a456e (patch)
treef1275d993b18b66a2678a3ca9478c8e923371aa7 /src/main
parent31411b788a28b5a2a3bc5de9aa8691b4389d83ff (diff)
add new Emoji library
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditMessage.java4
-rw-r--r--src/main/java/de/pixart/messenger/ui/StartUI.java4
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java4
-rw-r--r--src/main/java/de/pixart/messenger/ui/widget/CopyTextView.java8
-rw-r--r--src/main/res/layout/ab_title.xml4
-rw-r--r--src/main/res/layout/activity_contact_details.xml7
-rw-r--r--src/main/res/layout/activity_muc_details.xml5
-rw-r--r--src/main/res/layout/activity_set_presence.xml5
-rw-r--r--src/main/res/layout/contact.xml5
-rw-r--r--src/main/res/layout/conversation_list_row.xml4
-rw-r--r--src/main/res/layout/create_conference_dialog.xml2
-rw-r--r--src/main/res/layout/fragment_conversation.xml4
-rw-r--r--src/main/res/layout/message_received.xml3
-rw-r--r--src/main/res/layout/message_sent.xml3
-rw-r--r--src/main/res/layout/presence_template.xml4
-rw-r--r--src/main/res/layout/quickedit.xml5
-rw-r--r--src/main/res/layout/show_location_infowindow.xml2
-rw-r--r--src/main/res/values/strings.xml2
18 files changed, 42 insertions, 33 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/EditMessage.java b/src/main/java/de/pixart/messenger/ui/EditMessage.java
index 62d6a6aee..479fd3445 100644
--- a/src/main/java/de/pixart/messenger/ui/EditMessage.java
+++ b/src/main/java/de/pixart/messenger/ui/EditMessage.java
@@ -15,11 +15,11 @@ import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
+import android.widget.EditText;
import de.pixart.messenger.Config;
-import github.ankushsachdeva.emojicon.EmojiconEditText;
-public class EditMessage extends EmojiconEditText {
+public class EditMessage extends EditText {
private OnCommitContentListener mCommitContentListener = null;
private String[] mimeTypes = null;
diff --git a/src/main/java/de/pixart/messenger/ui/StartUI.java b/src/main/java/de/pixart/messenger/ui/StartUI.java
index 18a5d0f0d..7cc71f919 100644
--- a/src/main/java/de/pixart/messenger/ui/StartUI.java
+++ b/src/main/java/de/pixart/messenger/ui/StartUI.java
@@ -13,6 +13,9 @@ import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
+import com.vanniktech.emoji.EmojiManager;
+import com.vanniktech.emoji.ios.IosEmojiProvider;
+
import java.util.List;
import de.pixart.messenger.Config;
@@ -33,6 +36,7 @@ public class StartUI extends AppCompatActivity
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_start_ui);
+ EmojiManager.install(new IosEmojiProvider()); // This line needs to be executed before any usage of EmojiTextView or EmojiEditText.
requestNeededPermissions();
}
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
index d7467b7a4..b46ec8296 100644
--- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
@@ -52,6 +52,9 @@ import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Toast;
+import com.vanniktech.emoji.EmojiManager;
+import com.vanniktech.emoji.ios.IosEmojiProvider;
+
import net.java.otr4j.session.SessionID;
import java.io.FileNotFoundException;
@@ -394,6 +397,7 @@ public abstract class XmppActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ EmojiManager.install(new IosEmojiProvider()); // This line needs to be executed before any usage of EmojiTextView or EmojiEditText.
metrics = getResources().getDisplayMetrics();
ExceptionHelper.init(getApplicationContext());
mPrimaryTextColor = getResources().getColor(R.color.black87);
diff --git a/src/main/java/de/pixart/messenger/ui/widget/CopyTextView.java b/src/main/java/de/pixart/messenger/ui/widget/CopyTextView.java
index 42a8ac29f..59223adcd 100644
--- a/src/main/java/de/pixart/messenger/ui/widget/CopyTextView.java
+++ b/src/main/java/de/pixart/messenger/ui/widget/CopyTextView.java
@@ -7,9 +7,9 @@ import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
-import github.ankushsachdeva.emojicon.EmojiconTextView;
+import com.vanniktech.emoji.EmojiTextView;
-public class CopyTextView extends EmojiconTextView {
+public class CopyTextView extends EmojiTextView {
public CopyTextView(Context context) {
super(context);
@@ -20,13 +20,13 @@ public class CopyTextView extends EmojiconTextView {
}
public CopyTextView(Context context, AttributeSet attrs, int defStyleAttr) {
- super(context, attrs, defStyleAttr);
+ super(context, attrs); //, defStyleAttr);
}
@SuppressWarnings("unused")
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public CopyTextView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
- super(context, attrs, defStyleAttr); //, defStyleRes);
+ super(context, attrs); //, defStyleAttr); //, defStyleRes);
}
public interface CopyHandler {
diff --git a/src/main/res/layout/ab_title.xml b/src/main/res/layout/ab_title.xml
index 2886a4716..3dbef8938 100644
--- a/src/main/res/layout/ab_title.xml
+++ b/src/main/res/layout/ab_title.xml
@@ -5,7 +5,7 @@
android:layout_height="match_parent"
android:gravity="start|center_vertical">
- <github.ankushsachdeva.emojicon.EmojiconTextView xmlns:android="http://schemas.android.com/apk/res/android"
+ <com.vanniktech.emoji.EmojiTextView
android:id="@android:id/text1"
style="@style/Base.TextAppearance.AppCompat.Widget.ActionBar.Title"
android:layout_width="match_parent"
@@ -19,7 +19,7 @@
android:onClick="onClick"
android:paddingTop="1dp" />
- <github.ankushsachdeva.emojicon.EmojiconTextView xmlns:android="http://schemas.android.com/apk/res/android"
+ <com.vanniktech.emoji.EmojiTextView
android:id="@android:id/text2"
style="@style/Base.TextAppearance.AppCompat.Widget.ActionBar.Subtitle"
android:layout_width="match_parent"
diff --git a/src/main/res/layout/activity_contact_details.xml b/src/main/res/layout/activity_contact_details.xml
index 73862bcea..932e4c8e5 100644
--- a/src/main/res/layout/activity_contact_details.xml
+++ b/src/main/res/layout/activity_contact_details.xml
@@ -64,7 +64,8 @@
android:layout_marginBottom="4dp"
android:layout_marginLeft="-2dp"
android:layout_marginTop="4dp"
- android:orientation="horizontal"></com.wefika.flowlayout.FlowLayout>
+ android:orientation="horizontal">
+ </com.wefika.flowlayout.FlowLayout>
<TextView
android:id="@+id/details_lastseen"
@@ -76,7 +77,7 @@
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp" />
- <github.ankushsachdeva.emojicon.EmojiconTextView
+ <com.vanniktech.emoji.EmojiTextView
android:id="@+id/status_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -88,7 +89,7 @@
android:textStyle="italic"
android:layout_marginBottom="4dp" />
- <github.ankushsachdeva.emojicon.EmojiconTextView
+ <com.vanniktech.emoji.EmojiTextView
android:id="@+id/resource"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/src/main/res/layout/activity_muc_details.xml b/src/main/res/layout/activity_muc_details.xml
index 1fce6b608..72eea9df5 100644
--- a/src/main/res/layout/activity_muc_details.xml
+++ b/src/main/res/layout/activity_muc_details.xml
@@ -140,7 +140,7 @@
android:orientation="vertical"
android:paddingLeft="8dp">
- <github.ankushsachdeva.emojicon.EmojiconTextView
+ <com.vanniktech.emoji.EmojiTextView
android:id="@+id/muc_your_nick"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -175,7 +175,8 @@
android:layout_weight="1"
android:divider="?android:dividerHorizontal"
android:orientation="vertical"
- android:showDividers="middle"></LinearLayout>
+ android:showDividers="middle">
+ </LinearLayout>
<Button
android:id="@+id/invite"
diff --git a/src/main/res/layout/activity_set_presence.xml b/src/main/res/layout/activity_set_presence.xml
index 517654093..76039683e 100644
--- a/src/main/res/layout/activity_set_presence.xml
+++ b/src/main/res/layout/activity_set_presence.xml
@@ -21,7 +21,7 @@
android:padding="@dimen/infocard_padding"
android:orientation="vertical">
- <github.ankushsachdeva.emojicon.EmojiconEditText
+ <EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine"
@@ -70,6 +70,7 @@
android:padding="@dimen/infocard_padding"
android:orientation="vertical"
android:divider="?android:dividerHorizontal"
- android:showDividers="middle"></LinearLayout>
+ android:showDividers="middle">
+ </LinearLayout>
</LinearLayout>
</ScrollView> \ No newline at end of file
diff --git a/src/main/res/layout/contact.xml b/src/main/res/layout/contact.xml
index 027b0d353..390031cc0 100644
--- a/src/main/res/layout/contact.xml
+++ b/src/main/res/layout/contact.xml
@@ -24,7 +24,7 @@
android:orientation="vertical"
android:paddingLeft="8dp">
- <github.ankushsachdeva.emojicon.EmojiconTextView
+ <com.vanniktech.emoji.EmojiTextView
android:id="@+id/contact_display_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -45,7 +45,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="-2dp"
- android:orientation="horizontal"></com.wefika.flowlayout.FlowLayout>
+ android:orientation="horizontal">
+ </com.wefika.flowlayout.FlowLayout>
<TextView
android:id="@+id/key"
diff --git a/src/main/res/layout/conversation_list_row.xml b/src/main/res/layout/conversation_list_row.xml
index 6d944b6c0..b09cdca50 100644
--- a/src/main/res/layout/conversation_list_row.xml
+++ b/src/main/res/layout/conversation_list_row.xml
@@ -41,7 +41,7 @@
android:layout_toRightOf="@+id/conversation_image"
android:paddingLeft="8dp">
- <github.ankushsachdeva.emojicon.EmojiconTextView
+ <com.vanniktech.emoji.EmojiTextView
android:id="@+id/conversation_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -83,7 +83,7 @@
android:layout_toRightOf="@+id/sender_name"
android:orientation="vertical">
- <github.ankushsachdeva.emojicon.EmojiconTextView
+ <com.vanniktech.emoji.EmojiTextView
android:id="@+id/conversation_lastmsg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/src/main/res/layout/create_conference_dialog.xml b/src/main/res/layout/create_conference_dialog.xml
index 822deb48c..e33b4516e 100644
--- a/src/main/res/layout/create_conference_dialog.xml
+++ b/src/main/res/layout/create_conference_dialog.xml
@@ -31,7 +31,7 @@
android:textColor="@color/black87"
android:textSize="?attr/TextSizeBody" />
- <github.ankushsachdeva.emojicon.EmojiconEditText
+ <EditText
android:id="@+id/subject"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
diff --git a/src/main/res/layout/fragment_conversation.xml b/src/main/res/layout/fragment_conversation.xml
index eff7afa8f..23d7c050d 100644
--- a/src/main/res/layout/fragment_conversation.xml
+++ b/src/main/res/layout/fragment_conversation.xml
@@ -19,7 +19,8 @@
android:listSelector="@android:color/transparent"
android:stackFromBottom="true"
android:transcriptMode="normal"
- tools:listitem="@layout/message_sent"></ListView>
+ tools:listitem="@layout/message_sent">
+ </ListView>
<RelativeLayout
android:id="@+id/textsend"
@@ -53,7 +54,6 @@
android:textColor="@color/black87"
android:singleLine="false">
- <requestFocus />
</de.pixart.messenger.ui.EditMessage>
<ImageButton
diff --git a/src/main/res/layout/message_received.xml b/src/main/res/layout/message_received.xml
index 1d193791c..722926a7f 100644
--- a/src/main/res/layout/message_received.xml
+++ b/src/main/res/layout/message_received.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:emojicon="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
@@ -58,7 +57,7 @@
<de.pixart.messenger.ui.widget.CopyTextView
android:id="@+id/message_body"
- emojicon:emojiconSize="28sp"
+ app:emojiSize="28sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="web"
diff --git a/src/main/res/layout/message_sent.xml b/src/main/res/layout/message_sent.xml
index c4b0e7d40..ad86e5959 100644
--- a/src/main/res/layout/message_sent.xml
+++ b/src/main/res/layout/message_sent.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:emojicon="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
@@ -60,7 +59,7 @@
<de.pixart.messenger.ui.widget.CopyTextView
android:id="@+id/message_body"
- emojicon:emojiconSize="28sp"
+ app:emojiSize="28sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="web"
diff --git a/src/main/res/layout/presence_template.xml b/src/main/res/layout/presence_template.xml
index ef6f01643..6972dfe58 100644
--- a/src/main/res/layout/presence_template.xml
+++ b/src/main/res/layout/presence_template.xml
@@ -19,14 +19,14 @@
android:layout_toStartOf="@+id/delete_button"
android:layout_marginRight="8dp">
- <github.ankushsachdeva.emojicon.EmojiconTextView
+ <com.vanniktech.emoji.EmojiTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/presence_status_message"
android:textColor="@color/black87"
android:textSize="?attr/TextSizeBody" />
- <github.ankushsachdeva.emojicon.EmojiconTextView
+ <com.vanniktech.emoji.EmojiTextView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/src/main/res/layout/quickedit.xml b/src/main/res/layout/quickedit.xml
index 5bbf7dad9..a526cee26 100644
--- a/src/main/res/layout/quickedit.xml
+++ b/src/main/res/layout/quickedit.xml
@@ -5,15 +5,14 @@
android:orientation="vertical"
android:padding="16dp">
- <github.ankushsachdeva.emojicon.EmojiconEditText
+ <EditText
android:id="@+id/editor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName"
android:textColor="@color/black87">
-
<requestFocus />
- </github.ankushsachdeva.emojicon.EmojiconEditText>
+ </EditText>
</LinearLayout> \ No newline at end of file
diff --git a/src/main/res/layout/show_location_infowindow.xml b/src/main/res/layout/show_location_infowindow.xml
index a4bdf108f..fab14f87e 100644
--- a/src/main/res/layout/show_location_infowindow.xml
+++ b/src/main/res/layout/show_location_infowindow.xml
@@ -9,7 +9,7 @@
android:layout_height="wrap_content"
android:orientation="vertical">
- <github.ankushsachdeva.emojicon.EmojiconTextView
+ <com.vanniktech.emoji.EmojiTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index de2515cca..5e6bfc05c 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -317,7 +317,7 @@
\n\nhttps://github.com/mangstadt/ez-vcard\n(FreeBSD)
\n\nhttps://github.com/googlesamples/easypermissions\n(Apache License, Version 2.0)
\n\nhttps://github.com/blazsolar/FlowLayout\n(Apache License, Version 2.0)
- \n\nhttps://github.com/ankushsachdeva/emojicon\n(Apache License, Version 2.0)
+ \n\nhttps://github.com/vanniktech/Emoji\n(Apache License, Version 2.0)
\n\nhttps://github.com/ypresto/android-transcoder\n(Apache License, Version 2.0)
\n\nhttp://www.eclipse.org/jetty/\n(Apache License, Version 2.0 and Eclipse Public License 1.0)
</string>