forked from android/compose-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UserInput.kt
676 lines (643 loc) · 24.7 KB
/
UserInput.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
/*
* Copyright 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.compose.jetchat.conversation
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.animation.core.MutableTransitionState
import androidx.compose.animation.expandHorizontally
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.shrinkHorizontally
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.paddingFrom
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.sizeIn
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.Button
import androidx.compose.material.ButtonDefaults
import androidx.compose.material.ContentAlpha
import androidx.compose.material.Divider
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.LocalContentAlpha
import androidx.compose.material.LocalContentColor
import androidx.compose.material.LocalTextStyle
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.material.TextButton
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.AlternateEmail
import androidx.compose.material.icons.outlined.Duo
import androidx.compose.material.icons.outlined.InsertPhoto
import androidx.compose.material.icons.outlined.Mood
import androidx.compose.material.icons.outlined.Place
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.SideEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.focus.focusTarget
import androidx.compose.ui.focus.onFocusChanged
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.layout.FirstBaseline
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.SemanticsPropertyKey
import androidx.compose.ui.semantics.SemanticsPropertyReceiver
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.TextRange
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.example.compose.jetchat.FunctionalityNotAvailablePopup
import com.example.compose.jetchat.R
import com.example.compose.jetchat.theme.compositedOnSurface
import com.example.compose.jetchat.theme.elevatedSurface
enum class InputSelector {
NONE,
MAP,
DM,
EMOJI,
PHONE,
PICTURE
}
enum class EmojiStickerSelector {
EMOJI,
STICKER
}
@Preview
@Composable
fun UserInputPreview() {
UserInput(onMessageSent = {})
}
@OptIn(ExperimentalFoundationApi::class)
@Composable
fun UserInput(
onMessageSent: (String) -> Unit,
modifier: Modifier = Modifier,
resetScroll: () -> Unit = {},
) {
var currentInputSelector by rememberSaveable { mutableStateOf(InputSelector.NONE) }
val dismissKeyboard = { currentInputSelector = InputSelector.NONE }
// Intercept back navigation if there's a InputSelector visible
if (currentInputSelector != InputSelector.NONE) {
BackPressHandler(onBackPressed = dismissKeyboard)
}
var textState by remember { mutableStateOf(TextFieldValue()) }
// Used to decide if the keyboard should be shown
var textFieldFocusState by remember { mutableStateOf(false) }
Column(modifier) {
Divider()
UserInputText(
textFieldValue = textState,
onTextChanged = { textState = it },
// Only show the keyboard if there's no input selector and text field has focus
keyboardShown = currentInputSelector == InputSelector.NONE && textFieldFocusState,
// Close extended selector if text field receives focus
onTextFieldFocused = { focused ->
if (focused) {
currentInputSelector = InputSelector.NONE
resetScroll()
}
textFieldFocusState = focused
},
focusState = textFieldFocusState
)
UserInputSelector(
onSelectorChange = { currentInputSelector = it },
sendMessageEnabled = textState.text.isNotBlank(),
onMessageSent = {
onMessageSent(textState.text)
// Reset text field and close keyboard
textState = TextFieldValue()
// Move scroll to bottom
resetScroll()
dismissKeyboard()
},
currentInputSelector = currentInputSelector
)
SelectorExpanded(
onCloseRequested = dismissKeyboard,
onTextAdded = { textState = textState.addText(it) },
currentSelector = currentInputSelector
)
}
}
private fun TextFieldValue.addText(newString: String): TextFieldValue {
val newText = this.text.replaceRange(
this.selection.start,
this.selection.end,
newString
)
val newSelection = TextRange(
start = newText.length,
end = newText.length
)
return this.copy(text = newText, selection = newSelection)
}
@Composable
private fun SelectorExpanded(
currentSelector: InputSelector,
onCloseRequested: () -> Unit,
onTextAdded: (String) -> Unit
) {
if (currentSelector == InputSelector.NONE) return
// Request focus to force the TextField to lose it
val focusRequester = FocusRequester()
// If the selector is shown, always request focus to trigger a TextField.onFocusChange.
SideEffect {
if (currentSelector == InputSelector.EMOJI) {
focusRequester.requestFocus()
}
}
val selectorExpandedColor = getSelectorExpandedColor()
Surface(color = selectorExpandedColor, elevation = 3.dp) {
when (currentSelector) {
InputSelector.EMOJI -> EmojiSelector(onTextAdded, focusRequester)
InputSelector.DM -> NotAvailablePopup(onCloseRequested)
InputSelector.PICTURE -> FunctionalityNotAvailablePanel()
InputSelector.MAP -> FunctionalityNotAvailablePanel()
InputSelector.PHONE -> FunctionalityNotAvailablePanel()
else -> { throw NotImplementedError() }
}
}
}
@OptIn(ExperimentalAnimationApi::class)
@Composable
fun FunctionalityNotAvailablePanel() {
AnimatedVisibility(
visibleState = remember { MutableTransitionState(false).apply { targetState = true } },
// Remove if https://issuetracker.google.com/190816173 is fixed
enter = expandHorizontally() + fadeIn(),
exit = shrinkHorizontally() + fadeOut()
) {
Column(
modifier = Modifier
.height(320.dp)
.fillMaxWidth(),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally,
) {
Text(
text = stringResource(id = R.string.not_available),
style = MaterialTheme.typography.subtitle1
)
CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.medium) {
Text(
text = stringResource(id = R.string.not_available_subtitle),
modifier = Modifier.paddingFrom(FirstBaseline, before = 32.dp),
style = MaterialTheme.typography.body2
)
}
}
}
}
@Composable
fun getSelectorExpandedColor(): Color {
return if (MaterialTheme.colors.isLight) {
MaterialTheme.colors.compositedOnSurface(0.04f)
} else {
MaterialTheme.colors.elevatedSurface(8.dp)
}
}
@Composable
private fun UserInputSelector(
onSelectorChange: (InputSelector) -> Unit,
sendMessageEnabled: Boolean,
onMessageSent: () -> Unit,
currentInputSelector: InputSelector,
modifier: Modifier = Modifier
) {
Row(
modifier = modifier
.height(56.dp)
.wrapContentHeight()
.padding(horizontal = 4.dp),
verticalAlignment = Alignment.CenterVertically
) {
InputSelectorButton(
onClick = { onSelectorChange(InputSelector.EMOJI) },
icon = Icons.Outlined.Mood,
selected = currentInputSelector == InputSelector.EMOJI,
description = stringResource(id = R.string.emoji_selector_bt_desc)
)
InputSelectorButton(
onClick = { onSelectorChange(InputSelector.DM) },
icon = Icons.Outlined.AlternateEmail,
selected = currentInputSelector == InputSelector.DM,
description = stringResource(id = R.string.dm_desc)
)
InputSelectorButton(
onClick = { onSelectorChange(InputSelector.PICTURE) },
icon = Icons.Outlined.InsertPhoto,
selected = currentInputSelector == InputSelector.PICTURE,
description = stringResource(id = R.string.attach_photo_desc)
)
InputSelectorButton(
onClick = { onSelectorChange(InputSelector.MAP) },
icon = Icons.Outlined.Place,
selected = currentInputSelector == InputSelector.MAP,
description = stringResource(id = R.string.map_selector_desc)
)
InputSelectorButton(
onClick = { onSelectorChange(InputSelector.PHONE) },
icon = Icons.Outlined.Duo,
selected = currentInputSelector == InputSelector.PHONE,
description = stringResource(id = R.string.videochat_desc)
)
val border = if (!sendMessageEnabled) {
BorderStroke(
width = 1.dp,
color = MaterialTheme.colors.onSurface.copy(alpha = 0.12f)
)
} else {
null
}
Spacer(modifier = Modifier.weight(1f))
val disabledContentColor =
MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.disabled)
val buttonColors = ButtonDefaults.buttonColors(
disabledBackgroundColor = MaterialTheme.colors.surface,
disabledContentColor = disabledContentColor
)
// Send button
Button(
modifier = Modifier
.padding(horizontal = 16.dp)
.height(36.dp),
enabled = sendMessageEnabled,
onClick = onMessageSent,
colors = buttonColors,
border = border,
contentPadding = PaddingValues(0.dp)
) {
Text(
stringResource(id = R.string.send),
modifier = Modifier.padding(horizontal = 16.dp)
)
}
}
}
@Composable
private fun InputSelectorButton(
onClick: () -> Unit,
icon: ImageVector,
description: String,
selected: Boolean
) {
IconButton(onClick = onClick) {
CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.medium) {
val tint = if (selected) MaterialTheme.colors.primary else LocalContentColor.current
Icon(
icon,
tint = tint,
modifier = Modifier
.padding(12.dp)
.size(20.dp),
contentDescription = description
)
}
}
}
@Composable
private fun NotAvailablePopup(onDismissed: () -> Unit) {
FunctionalityNotAvailablePopup(onDismissed)
}
val KeyboardShownKey = SemanticsPropertyKey<Boolean>("KeyboardShownKey")
var SemanticsPropertyReceiver.keyboardShownProperty by KeyboardShownKey
@ExperimentalFoundationApi
@Composable
private fun UserInputText(
keyboardType: KeyboardType = KeyboardType.Text,
onTextChanged: (TextFieldValue) -> Unit,
textFieldValue: TextFieldValue,
keyboardShown: Boolean,
onTextFieldFocused: (Boolean) -> Unit,
focusState: Boolean
) {
val a11ylabel = stringResource(id = R.string.textfield_desc)
Row(
modifier = Modifier
.fillMaxWidth()
.height(48.dp)
.semantics {
contentDescription = a11ylabel
keyboardShownProperty = keyboardShown
},
horizontalArrangement = Arrangement.End
) {
Surface {
Box(
modifier = Modifier
.height(48.dp)
.weight(1f)
.align(Alignment.Bottom)
) {
var lastFocusState by remember { mutableStateOf(false) }
BasicTextField(
value = textFieldValue,
onValueChange = { onTextChanged(it) },
modifier = Modifier
.fillMaxWidth()
.padding(start = 16.dp)
.align(Alignment.CenterStart)
.onFocusChanged { state ->
if (lastFocusState != state.isFocused) {
onTextFieldFocused(state.isFocused)
}
lastFocusState = state.isFocused
},
keyboardOptions = KeyboardOptions(
keyboardType = keyboardType,
imeAction = ImeAction.Send
),
maxLines = 1,
cursorBrush = SolidColor(LocalContentColor.current),
textStyle = LocalTextStyle.current.copy(color = LocalContentColor.current)
)
val disableContentColor =
MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.disabled)
if (textFieldValue.text.isEmpty() && !focusState) {
Text(
modifier = Modifier
.align(Alignment.CenterStart)
.padding(start = 16.dp),
text = stringResource(id = R.string.textfield_hint),
style = MaterialTheme.typography.body1.copy(color = disableContentColor)
)
}
}
}
}
}
@Composable
fun EmojiSelector(
onTextAdded: (String) -> Unit,
focusRequester: FocusRequester
) {
var selected by remember { mutableStateOf(EmojiStickerSelector.EMOJI) }
val a11yLabel = stringResource(id = R.string.emoji_selector_desc)
Column(
modifier = Modifier
.focusRequester(focusRequester) // Requests focus when the Emoji selector is displayed
// Make the emoji selector focusable so it can steal focus from TextField
.focusTarget()
.semantics { contentDescription = a11yLabel }
) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 8.dp)
) {
ExtendedSelectorInnerButton(
text = stringResource(id = R.string.emojis_label),
onClick = { selected = EmojiStickerSelector.EMOJI },
selected = true,
modifier = Modifier.weight(1f)
)
ExtendedSelectorInnerButton(
text = stringResource(id = R.string.stickers_label),
onClick = { selected = EmojiStickerSelector.STICKER },
selected = false,
modifier = Modifier.weight(1f)
)
}
Row(modifier = Modifier.verticalScroll(rememberScrollState())) {
EmojiTable(onTextAdded, modifier = Modifier.padding(8.dp))
}
}
if (selected == EmojiStickerSelector.STICKER) {
NotAvailablePopup(onDismissed = { selected = EmojiStickerSelector.EMOJI })
}
}
@Composable
fun ExtendedSelectorInnerButton(
text: String,
onClick: () -> Unit,
selected: Boolean,
modifier: Modifier = Modifier
) {
val colors = ButtonDefaults.buttonColors(
backgroundColor = MaterialTheme.colors.onSurface.copy(alpha = 0.08f),
disabledBackgroundColor = getSelectorExpandedColor(), // Same as background
contentColor = MaterialTheme.colors.onSurface,
disabledContentColor = MaterialTheme.colors.onSurface.copy(alpha = 0.74f)
)
TextButton(
onClick = onClick,
modifier = modifier
.padding(horizontal = 8.dp, vertical = 8.dp)
.height(30.dp),
shape = MaterialTheme.shapes.medium,
enabled = selected,
colors = colors,
contentPadding = PaddingValues(0.dp)
) {
Text(
text = text,
style = MaterialTheme.typography.subtitle2
)
}
}
@Composable
fun EmojiTable(
onTextAdded: (String) -> Unit,
modifier: Modifier = Modifier
) {
Column(modifier.fillMaxWidth()) {
repeat(4) { x ->
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceEvenly
) {
repeat(EMOJI_COLUMNS) { y ->
val emoji = emojis[x * EMOJI_COLUMNS + y]
Text(
modifier = Modifier
.clickable(onClick = { onTextAdded(emoji) })
.sizeIn(minWidth = 42.dp, minHeight = 42.dp)
.padding(8.dp),
text = emoji,
style = LocalTextStyle.current.copy(
fontSize = 18.sp,
textAlign = TextAlign.Center
)
)
}
}
}
}
}
private const val EMOJI_COLUMNS = 10
private val emojis = listOf(
"\ud83d\ude00", // Grinning Face
"\ud83d\ude01", // Grinning Face With Smiling Eyes
"\ud83d\ude02", // Face With Tears of Joy
"\ud83d\ude03", // Smiling Face With Open Mouth
"\ud83d\ude04", // Smiling Face With Open Mouth and Smiling Eyes
"\ud83d\ude05", // Smiling Face With Open Mouth and Cold Sweat
"\ud83d\ude06", // Smiling Face With Open Mouth and Tightly-Closed Eyes
"\ud83d\ude09", // Winking Face
"\ud83d\ude0a", // Smiling Face With Smiling Eyes
"\ud83d\ude0b", // Face Savouring Delicious Food
"\ud83d\ude0e", // Smiling Face With Sunglasses
"\ud83d\ude0d", // Smiling Face With Heart-Shaped Eyes
"\ud83d\ude18", // Face Throwing a Kiss
"\ud83d\ude17", // Kissing Face
"\ud83d\ude19", // Kissing Face With Smiling Eyes
"\ud83d\ude1a", // Kissing Face With Closed Eyes
"\u263a", // White Smiling Face
"\ud83d\ude42", // Slightly Smiling Face
"\ud83e\udd17", // Hugging Face
"\ud83d\ude07", // Smiling Face With Halo
"\ud83e\udd13", // Nerd Face
"\ud83e\udd14", // Thinking Face
"\ud83d\ude10", // Neutral Face
"\ud83d\ude11", // Expressionless Face
"\ud83d\ude36", // Face Without Mouth
"\ud83d\ude44", // Face With Rolling Eyes
"\ud83d\ude0f", // Smirking Face
"\ud83d\ude23", // Persevering Face
"\ud83d\ude25", // Disappointed but Relieved Face
"\ud83d\ude2e", // Face With Open Mouth
"\ud83e\udd10", // Zipper-Mouth Face
"\ud83d\ude2f", // Hushed Face
"\ud83d\ude2a", // Sleepy Face
"\ud83d\ude2b", // Tired Face
"\ud83d\ude34", // Sleeping Face
"\ud83d\ude0c", // Relieved Face
"\ud83d\ude1b", // Face With Stuck-Out Tongue
"\ud83d\ude1c", // Face With Stuck-Out Tongue and Winking Eye
"\ud83d\ude1d", // Face With Stuck-Out Tongue and Tightly-Closed Eyes
"\ud83d\ude12", // Unamused Face
"\ud83d\ude13", // Face With Cold Sweat
"\ud83d\ude14", // Pensive Face
"\ud83d\ude15", // Confused Face
"\ud83d\ude43", // Upside-Down Face
"\ud83e\udd11", // Money-Mouth Face
"\ud83d\ude32", // Astonished Face
"\ud83d\ude37", // Face With Medical Mask
"\ud83e\udd12", // Face With Thermometer
"\ud83e\udd15", // Face With Head-Bandage
"\u2639", // White Frowning Face
"\ud83d\ude41", // Slightly Frowning Face
"\ud83d\ude16", // Confounded Face
"\ud83d\ude1e", // Disappointed Face
"\ud83d\ude1f", // Worried Face
"\ud83d\ude24", // Face With Look of Triumph
"\ud83d\ude22", // Crying Face
"\ud83d\ude2d", // Loudly Crying Face
"\ud83d\ude26", // Frowning Face With Open Mouth
"\ud83d\ude27", // Anguished Face
"\ud83d\ude28", // Fearful Face
"\ud83d\ude29", // Weary Face
"\ud83d\ude2c", // Grimacing Face
"\ud83d\ude30", // Face With Open Mouth and Cold Sweat
"\ud83d\ude31", // Face Screaming in Fear
"\ud83d\ude33", // Flushed Face
"\ud83d\ude35", // Dizzy Face
"\ud83d\ude21", // Pouting Face
"\ud83d\ude20", // Angry Face
"\ud83d\ude08", // Smiling Face With Horns
"\ud83d\udc7f", // Imp
"\ud83d\udc79", // Japanese Ogre
"\ud83d\udc7a", // Japanese Goblin
"\ud83d\udc80", // Skull
"\ud83d\udc7b", // Ghost
"\ud83d\udc7d", // Extraterrestrial Alien
"\ud83e\udd16", // Robot Face
"\ud83d\udca9", // Pile of Poo
"\ud83d\ude3a", // Smiling Cat Face With Open Mouth
"\ud83d\ude38", // Grinning Cat Face With Smiling Eyes
"\ud83d\ude39", // Cat Face With Tears of Joy
"\ud83d\ude3b", // Smiling Cat Face With Heart-Shaped Eyes
"\ud83d\ude3c", // Cat Face With Wry Smile
"\ud83d\ude3d", // Kissing Cat Face With Closed Eyes
"\ud83d\ude40", // Weary Cat Face
"\ud83d\ude3f", // Crying Cat Face
"\ud83d\ude3e", // Pouting Cat Face
"\ud83d\udc66", // Boy
"\ud83d\udc67", // Girl
"\ud83d\udc68", // Man
"\ud83d\udc69", // Woman
"\ud83d\udc74", // Older Man
"\ud83d\udc75", // Older Woman
"\ud83d\udc76", // Baby
"\ud83d\udc71", // Person With Blond Hair
"\ud83d\udc6e", // Police Officer
"\ud83d\udc72", // Man With Gua Pi Mao
"\ud83d\udc73", // Man With Turban
"\ud83d\udc77", // Construction Worker
"\u26d1", // Helmet With White Cross
"\ud83d\udc78", // Princess
"\ud83d\udc82", // Guardsman
"\ud83d\udd75", // Sleuth or Spy
"\ud83c\udf85", // Father Christmas
"\ud83d\udc70", // Bride With Veil
"\ud83d\udc7c", // Baby Angel
"\ud83d\udc86", // Face Massage
"\ud83d\udc87", // Haircut
"\ud83d\ude4d", // Person Frowning
"\ud83d\ude4e", // Person With Pouting Face
"\ud83d\ude45", // Face With No Good Gesture
"\ud83d\ude46", // Face With OK Gesture
"\ud83d\udc81", // Information Desk Person
"\ud83d\ude4b", // Happy Person Raising One Hand
"\ud83d\ude47", // Person Bowing Deeply
"\ud83d\ude4c", // Person Raising Both Hands in Celebration
"\ud83d\ude4f", // Person With Folded Hands
"\ud83d\udde3", // Speaking Head in Silhouette
"\ud83d\udc64", // Bust in Silhouette
"\ud83d\udc65", // Busts in Silhouette
"\ud83d\udeb6", // Pedestrian
"\ud83c\udfc3", // Runner
"\ud83d\udc6f", // Woman With Bunny Ears
"\ud83d\udc83", // Dancer
"\ud83d\udd74", // Man in Business Suit Levitating
"\ud83d\udc6b", // Man and Woman Holding Hands
"\ud83d\udc6c", // Two Men Holding Hands
"\ud83d\udc6d", // Two Women Holding Hands
"\ud83d\udc8f" // Kiss
)