Skip to content

Commit f747436

Browse files
committed
Updated emoji set
// FREEBIE
1 parent 1b44bdc commit f747436

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+625
-298
lines changed

assets/emoji-nature.png

-922 KB
Binary file not shown.

assets/emoji-objects.png

-681 KB
Binary file not shown.

assets/emoji-people.png

-612 KB
Binary file not shown.

assets/emoji-places.png

-511 KB
Binary file not shown.

assets/emoji-symbol.png

-546 KB
Binary file not shown.

assets/emoji/Activity.png

286 KB

assets/emoji/Flags.png

777 KB

assets/emoji/Foods.png

372 KB

assets/emoji/Nature.png

781 KB

assets/emoji/Objects.png

783 KB

assets/emoji/People.png

846 KB

assets/emoji/Places.png

540 KB

assets/emoji/Symbols.png

737 KB
494 Bytes
135 Bytes
228 Bytes
328 Bytes
100 Bytes
160 Bytes
134 Bytes
244 Bytes
168 Bytes
336 Bytes
200 Bytes
413 Bytes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:enterFadeDuration="200"
4+
android:exitFadeDuration="300">
5+
<item android:state_selected="true">
6+
<bitmap android:src="@drawable/ic_directions_bike_white_24dp"
7+
android:tint="@color/grey_400"/>
8+
</item>
9+
<item>
10+
<bitmap android:src="@drawable/ic_directions_bike_white_24dp"
11+
android:tint="@color/grey_700"/>
12+
</item>
13+
14+
</selector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:enterFadeDuration="200"
4+
android:exitFadeDuration="300">
5+
<item android:state_selected="true">
6+
<bitmap android:src="@drawable/ic_directions_bike_white_24dp"
7+
android:tint="@color/grey_800"/>
8+
</item>
9+
<item>
10+
<bitmap android:src="@drawable/ic_directions_bike_white_24dp"
11+
android:tint="@color/grey_400"/>
12+
</item>
13+
14+
</selector>
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:enterFadeDuration="200"
4+
android:exitFadeDuration="300">
5+
<item android:state_selected="true">
6+
<bitmap android:src="@drawable/ic_flag_white_24dp"
7+
android:tint="@color/grey_400"/>
8+
</item>
9+
<item>
10+
<bitmap android:src="@drawable/ic_flag_white_24dp"
11+
android:tint="@color/grey_700"/>
12+
</item>
13+
14+
</selector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:enterFadeDuration="200"
4+
android:exitFadeDuration="300">
5+
<item android:state_selected="true">
6+
<bitmap android:src="@drawable/ic_flag_white_24dp"
7+
android:tint="@color/grey_800"/>
8+
</item>
9+
<item>
10+
<bitmap android:src="@drawable/ic_flag_white_24dp"
11+
android:tint="@color/grey_400"/>
12+
</item>
13+
14+
</selector>
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:enterFadeDuration="200"
4+
android:exitFadeDuration="300">
5+
<item android:state_selected="true">
6+
<bitmap android:src="@drawable/ic_restaurant_white_24dp"
7+
android:tint="@color/grey_400"/>
8+
</item>
9+
<item>
10+
<bitmap android:src="@drawable/ic_restaurant_white_24dp"
11+
android:tint="@color/grey_700"/>
12+
</item>
13+
14+
</selector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:enterFadeDuration="200"
4+
android:exitFadeDuration="300">
5+
<item android:state_selected="true">
6+
<bitmap android:src="@drawable/ic_restaurant_white_24dp"
7+
android:tint="@color/grey_800"/>
8+
</item>
9+
<item>
10+
<bitmap android:src="@drawable/ic_restaurant_white_24dp"
11+
android:tint="@color/grey_400"/>
12+
</item>
13+
14+
</selector>
+11-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<selector xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:enterFadeDuration="200"
4-
android:exitFadeDuration="300">
5-
<item android:state_selected="true" android:drawable="@drawable/ic_emoji_objects_activated_dark" />
6-
<item android:drawable="@drawable/ic_emoji_objects_normal_dark" />
3+
android:enterFadeDuration="200"
4+
android:exitFadeDuration="300">
5+
<item android:state_selected="true">
6+
<bitmap android:src="@drawable/ic_lightbulb_outline_white_24dp"
7+
android:tint="@color/grey_400"/>
8+
</item>
9+
<item>
10+
<bitmap android:src="@drawable/ic_lightbulb_outline_white_24dp"
11+
android:tint="@color/grey_700"/>
12+
</item>
13+
714
</selector>
+11-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<selector xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:enterFadeDuration="200"
4-
android:exitFadeDuration="300">
5-
<item android:state_selected="true" android:drawable="@drawable/ic_emoji_objects_activated_light" />
6-
<item android:drawable="@drawable/ic_emoji_objects_normal_light" />
3+
android:enterFadeDuration="200"
4+
android:exitFadeDuration="300">
5+
<item android:state_selected="true">
6+
<bitmap android:src="@drawable/ic_lightbulb_outline_white_24dp"
7+
android:tint="@color/grey_800"/>
8+
</item>
9+
<item>
10+
<bitmap android:src="@drawable/ic_lightbulb_outline_white_24dp"
11+
android:tint="@color/grey_400"/>
12+
</item>
13+
714
</selector>

res/values/attrs.xml

+4-1
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,13 @@
5252

5353
<attr name="emoji_category_recent" format="reference"/>
5454
<attr name="emoji_category_people" format="reference"/>
55-
<attr name="emoji_category_objects" format="reference"/>
5655
<attr name="emoji_category_nature" format="reference"/>
56+
<attr name="emoji_category_foods" format="reference"/>
57+
<attr name="emoji_category_activity" format="reference"/>
5758
<attr name="emoji_category_places" format="reference"/>
59+
<attr name="emoji_category_objects" format="reference"/>
5860
<attr name="emoji_category_symbol" format="reference"/>
61+
<attr name="emoji_category_flags" format="reference"/>
5962
<attr name="emoji_category_emoticons" format="reference"/>
6063
<attr name="quick_camera_icon" format="reference"/>
6164
<attr name="quick_mic_icon" format="reference"/>

res/values/themes.xml

+8-2
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,13 @@
137137

138138
<item name="emoji_category_recent">@drawable/emoji_category_recent_light</item>
139139
<item name="emoji_category_people">@drawable/emoji_category_people_light</item>
140-
<item name="emoji_category_objects">@drawable/emoji_category_objects_light</item>
141140
<item name="emoji_category_nature">@drawable/emoji_category_nature_light</item>
141+
<item name="emoji_category_foods">@drawable/emoji_category_foods_light</item>
142+
<item name="emoji_category_activity">@drawable/emoji_category_activity_light</item>
142143
<item name="emoji_category_places">@drawable/emoji_category_places_light</item>
144+
<item name="emoji_category_objects">@drawable/emoji_category_objects_light</item>
143145
<item name="emoji_category_symbol">@drawable/emoji_category_symbol_light</item>
146+
<item name="emoji_category_flags">@drawable/emoji_category_flags_light</item>
144147
<item name="emoji_category_emoticons">@drawable/emoji_category_emoticons_light</item>
145148

146149

@@ -280,10 +283,13 @@
280283

281284
<item name="emoji_category_recent">@drawable/emoji_category_recent_dark</item>
282285
<item name="emoji_category_people">@drawable/emoji_category_people_dark</item>
283-
<item name="emoji_category_objects">@drawable/emoji_category_objects_dark</item>
284286
<item name="emoji_category_nature">@drawable/emoji_category_nature_dark</item>
287+
<item name="emoji_category_foods">@drawable/emoji_category_foods_dark</item>
288+
<item name="emoji_category_activity">@drawable/emoji_category_activity_dark</item>
285289
<item name="emoji_category_places">@drawable/emoji_category_places_dark</item>
290+
<item name="emoji_category_objects">@drawable/emoji_category_objects_dark</item>
286291
<item name="emoji_category_symbol">@drawable/emoji_category_symbol_dark</item>
292+
<item name="emoji_category_flags">@drawable/emoji_category_flags_dark</item>
287293
<item name="emoji_category_emoticons">@drawable/emoji_category_emoticons_dark</item>
288294

289295
<item name="quick_camera_icon">@drawable/quick_camera_dark</item>

src/org/thoughtcrime/securesms/components/emoji/EmojiDrawer.java

+15-8
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ private void initializeResources(View v) {
6868

6969
RepeatableImageKey backspace = (RepeatableImageKey)v.findViewById(R.id.backspace);
7070
backspace.setOnKeyEventListener(new KeyEventListener() {
71-
@Override public void onKeyEvent() {
71+
@Override
72+
public void onKeyEvent() {
7273
if (listener != null) listener.onKeyEvent(DELETE_KEY_EVENT);
7374
}
7475
});
@@ -101,7 +102,8 @@ private void initializeEmojiGrid() {
101102
pager.setAdapter(new EmojiPagerAdapter(getContext(),
102103
models,
103104
new EmojiSelectionListener() {
104-
@Override public void onEmojiSelected(String emoji) {
105+
@Override
106+
public void onEmojiSelected(String emoji) {
105107
Log.w("EmojiDrawer", "onEmojiSelected()");
106108
recentModel.onCodePointSelected(emoji);
107109
if (listener != null) listener.onEmojiSelected(emoji);
@@ -143,30 +145,35 @@ public int getCount() {
143145
return pages.size();
144146
}
145147

146-
@Override public Object instantiateItem(ViewGroup container, int position) {
148+
@Override
149+
public Object instantiateItem(ViewGroup container, int position) {
147150
EmojiPageView page = new EmojiPageView(context);
148151
page.setModel(pages.get(position));
149152
page.setEmojiSelectedListener(listener);
150153
container.addView(page);
151154
return page;
152155
}
153156

154-
@Override public void destroyItem(ViewGroup container, int position, Object object) {
157+
@Override
158+
public void destroyItem(ViewGroup container, int position, Object object) {
155159
container.removeView((View)object);
156160
}
157161

158-
@Override public void setPrimaryItem(ViewGroup container, int position, Object object) {
162+
@Override
163+
public void setPrimaryItem(ViewGroup container, int position, Object object) {
159164
EmojiPageView current = (EmojiPageView) object;
160165
current.onSelected();
161166
super.setPrimaryItem(container, position, object);
162167
}
163168

164-
@Override public boolean isViewFromObject(View view, Object object) {
169+
@Override
170+
public boolean isViewFromObject(View view, Object object) {
165171
return view == object;
166172
}
167173

168-
@Override public View getCustomTabView(ViewGroup viewGroup, int i) {
169-
ImageView image = new ImageView(context);
174+
@Override
175+
public View getCustomTabView(ViewGroup viewGroup, int i) {
176+
ImageView image = new ImageView(context);
170177
image.setScaleType(ScaleType.CENTER_INSIDE);
171178
image.setImageResource(ResUtil.getDrawableRes(context, pages.get(i).getIconAttr()));
172179
return image;

src/org/thoughtcrime/securesms/components/emoji/EmojiFilter.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,18 @@ public EmojiFilter(TextView view) {
1313
this.view = view;
1414
}
1515

16-
@Override public CharSequence filter(CharSequence source, int start, int end,
17-
Spanned dest, int dstart, int dend)
16+
@Override
17+
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend)
1818
{
1919
char[] v = new char[end - start];
2020
TextUtils.getChars(source, start, end, v, 0);
21+
2122
Spannable emojified = EmojiProvider.getInstance(view.getContext()).emojify(new String(v), view);
23+
2224
if (source instanceof Spanned && emojified != null) {
2325
TextUtils.copySpansFrom((Spanned) source, start, end, null, emojified, 0);
2426
}
27+
2528
return emojified;
2629
}
2730
}

0 commit comments

Comments
 (0)