aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorYuichi Araki <yaraki@google.com>2017-05-16 11:45:02 -0700
committerYuichi Araki <yaraki@google.com>2017-05-16 20:34:11 -0700
commite29bb92cfcfb287fc9c10eb20de721c2803c7eec (patch)
tree17920fec11f4998b0f5dfe2ab78be60349366569 /views
parent0608d4070e5d0fb57ea6f3be4167c9a172c7bf90 (diff)
downloadandroid-e29bb92cfcfb287fc9c10eb20de721c2803c7eec.tar.gz
EmojiCompat: Add Kotlin implementation
Test: Existing tests still pass Change-Id: I97870803a96237bef1b155626a2251aed5470cb0
Diffstat (limited to 'views')
-rw-r--r--views/EmojiCompat/kotlinApp/.gitignore1
-rw-r--r--views/EmojiCompat/kotlinApp/build.gradle70
-rw-r--r--views/EmojiCompat/kotlinApp/proguard-rules.pro25
-rw-r--r--views/EmojiCompat/kotlinApp/src/androidTest/java/com/example/android/emojicompat/MainActivityTest.kt51
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/AndroidManifest.xml42
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/java/com/example/android/emojicompat/CustomTextView.kt68
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/java/com/example/android/emojicompat/EmojiCompatApplication.kt69
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/java/com/example/android/emojicompat/MainActivity.kt68
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/res/layout/activity_main.xml69
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/res/mipmap-hdpi/ic_launcher.pngbin0 -> 3545 bytes
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/res/mipmap-mdpi/ic_launcher.pngbin0 -> 2182 bytes
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/res/mipmap-xhdpi/ic_launcher.pngbin0 -> 4598 bytes
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/res/mipmap-xxhdpi/ic_launcher.pngbin0 -> 7372 bytes
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/res/mipmap-xxxhdpi/ic_launcher.pngbin0 -> 10555 bytes
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/res/values/colors.xml21
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/res/values/dimens.xml21
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/res/values/font_certs.xml32
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/res/values/strings.xml24
-rw-r--r--views/EmojiCompat/kotlinApp/src/main/res/values/styles.xml25
-rw-r--r--views/EmojiCompat/settings.gradle1
20 files changed, 587 insertions, 0 deletions
diff --git a/views/EmojiCompat/kotlinApp/.gitignore b/views/EmojiCompat/kotlinApp/.gitignore
new file mode 100644
index 00000000..796b96d1
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/views/EmojiCompat/kotlinApp/build.gradle b/views/EmojiCompat/kotlinApp/build.gradle
new file mode 100644
index 00000000..af061cdd
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/build.gradle
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2017 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
+ *
+ * http://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.
+ */
+
+buildscript {
+ ext {
+ kotlin_version = '1.1.2-3'
+ }
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+
+ext {
+ supportLibVersion = '26.0.0-beta1'
+}
+
+android {
+ compileSdkVersion 'android-O'
+ buildToolsVersion "26.0.0-rc1"
+ defaultConfig {
+ applicationId "com.example.android.emojicompat"
+ minSdkVersion 'O'
+ targetSdkVersion 'O'
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+ configurations.all {
+ resolutionStrategy.force "com.android.support:support-annotations:$supportLibVersion"
+ }
+}
+
+dependencies {
+ // Support Libraries
+ compile "com.android.support:appcompat-v7:$supportLibVersion"
+ compile "com.android.support:support-emoji:$supportLibVersion"
+ compile "com.android.support:support-emoji-appcompat:$supportLibVersion"
+ compile "com.android.support:support-emoji-bundled:$supportLibVersion"
+
+ // Test
+ testCompile 'junit:junit:4.12'
+ androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
+
+ compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
+}
diff --git a/views/EmojiCompat/kotlinApp/proguard-rules.pro b/views/EmojiCompat/kotlinApp/proguard-rules.pro
new file mode 100644
index 00000000..06b266fc
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/proguard-rules.pro
@@ -0,0 +1,25 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /usr/local/google/home/yaraki/Android/Sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/views/EmojiCompat/kotlinApp/src/androidTest/java/com/example/android/emojicompat/MainActivityTest.kt b/views/EmojiCompat/kotlinApp/src/androidTest/java/com/example/android/emojicompat/MainActivityTest.kt
new file mode 100644
index 00000000..e4f93d5d
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/androidTest/java/com/example/android/emojicompat/MainActivityTest.kt
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2017 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
+ *
+ * http://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.android.emojicompat
+
+import android.support.test.espresso.Espresso.onView
+import android.support.test.espresso.assertion.ViewAssertions.matches
+import android.support.test.espresso.matcher.ViewMatchers.isDisplayed
+import android.support.test.espresso.matcher.ViewMatchers.withText
+import android.support.test.filters.MediumTest
+import android.support.test.rule.ActivityTestRule
+import android.support.test.runner.AndroidJUnit4
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+
+@RunWith(AndroidJUnit4::class)
+class MainActivityTest {
+
+ @Rule @JvmField
+ val rule = ActivityTestRule(MainActivity::class.java)
+
+ @Test
+ @MediumTest
+ @Throws(Exception::class)
+ fun allTextsDisplayed() {
+ arrayOf(R.string.emoji_text_view,
+ R.string.emoji_edit_text,
+ R.string.emoji_button,
+ R.string.regular_text_view,
+ R.string.custom_text_view).forEach {
+ val text = rule.activity.getString(it, MainActivity.EMOJI)
+ onView(withText(text)).check(matches(isDisplayed()))
+ }
+ }
+
+}
diff --git a/views/EmojiCompat/kotlinApp/src/main/AndroidManifest.xml b/views/EmojiCompat/kotlinApp/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..4f2453d4
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/AndroidManifest.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2017 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
+
+ http://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.
+-->
+<manifest
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ package="com.example.android.emojicompat">
+
+ <application
+ android:name=".EmojiCompatApplication"
+ android:allowBackup="true"
+ android:icon="@mipmap/ic_launcher"
+ android:label="@string/app_name"
+ android:supportsRtl="true"
+ android:theme="@style/Theme.EmojiCompat"
+ tools:ignore="GoogleAppIndexingWarning">
+
+ <activity
+ android:name=".MainActivity"
+ android:windowSoftInputMode="stateUnchanged">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN"/>
+ <category android:name="android.intent.category.LAUNCHER"/>
+ </intent-filter>
+ </activity>
+
+ </application>
+
+</manifest>
diff --git a/views/EmojiCompat/kotlinApp/src/main/java/com/example/android/emojicompat/CustomTextView.kt b/views/EmojiCompat/kotlinApp/src/main/java/com/example/android/emojicompat/CustomTextView.kt
new file mode 100644
index 00000000..3da4e11e
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/java/com/example/android/emojicompat/CustomTextView.kt
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2017 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
+ *
+ * http://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.android.emojicompat
+
+import android.content.Context
+import android.support.text.emoji.widget.EmojiTextViewHelper
+import android.support.v7.widget.AppCompatTextView
+import android.text.InputFilter
+import android.util.AttributeSet
+
+
+/**
+ * A sample implementation of custom TextView.
+
+ *
+ * You can use [EmojiTextViewHelper] to make your custom TextView compatible with
+ * EmojiCompat.
+ */
+class CustomTextView @JvmOverloads constructor(
+ context: Context,
+ attrs: AttributeSet? = null,
+ defStyleAttr: Int = 0)
+ : AppCompatTextView(context, attrs, defStyleAttr) {
+
+ private var mEmojiTextViewHelper: EmojiTextViewHelper? = null
+
+ init {
+ emojiTextViewHelper.updateTransformationMethod()
+ }
+
+ override fun setFilters(filters: Array<InputFilter>) {
+ super.setFilters(emojiTextViewHelper.getFilters(filters))
+ }
+
+ override fun setAllCaps(allCaps: Boolean) {
+ super.setAllCaps(allCaps)
+ emojiTextViewHelper.setAllCaps(allCaps)
+ }
+
+ /**
+ * Returns the [EmojiTextViewHelper] for this TextView.
+
+ *
+ * This property can be called from super constructors through [#setFilters] or [#setAllCaps].
+ */
+ private val emojiTextViewHelper: EmojiTextViewHelper
+ get() {
+ if (mEmojiTextViewHelper == null) {
+ mEmojiTextViewHelper = EmojiTextViewHelper(this)
+ }
+ return mEmojiTextViewHelper as EmojiTextViewHelper
+ }
+
+}
diff --git a/views/EmojiCompat/kotlinApp/src/main/java/com/example/android/emojicompat/EmojiCompatApplication.kt b/views/EmojiCompat/kotlinApp/src/main/java/com/example/android/emojicompat/EmojiCompatApplication.kt
new file mode 100644
index 00000000..3f03de08
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/java/com/example/android/emojicompat/EmojiCompatApplication.kt
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2017 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
+ *
+ * http://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.android.emojicompat
+
+import android.app.Application
+import android.support.text.emoji.EmojiCompat
+import android.support.text.emoji.FontRequestEmojiCompatConfig
+import android.support.text.emoji.bundled.BundledEmojiCompatConfig
+import android.support.v4.provider.FontRequest
+import android.util.Log
+
+
+/**
+ * This application uses EmojiCompat.
+ */
+class EmojiCompatApplication : Application() {
+
+ override fun onCreate() {
+ super.onCreate()
+
+ val config: EmojiCompat.Config
+ if (USE_BUNDLED_EMOJI) {
+ // Use the bundled font for EmojiCompat
+ config = BundledEmojiCompatConfig(applicationContext)
+ } else {
+ // Use a downloadable font for EmojiCompat
+ val fontRequest = FontRequest(
+ "com.google.android.gms.fonts",
+ "com.google.android.gms",
+ "Noto Color Emoji Compat",
+ R.array.com_google_android_gms_fonts_certs)
+ config = FontRequestEmojiCompatConfig(applicationContext, fontRequest)
+ .setReplaceAll(true)
+ .registerInitCallback(object : EmojiCompat.InitCallback() {
+ override fun onInitialized() {
+ Log.i(TAG, "EmojiCompat initialized")
+ }
+
+ override fun onFailed(throwable: Throwable?) {
+ Log.e(TAG, "EmojiCompat initialization failed", throwable)
+ }
+ })
+ }
+ EmojiCompat.init(config)
+ }
+
+ companion object {
+
+ private val TAG = "EmojiCompatApplication"
+
+ /** Change this to `false` when you want to use the downloadable Emoji font. */
+ private val USE_BUNDLED_EMOJI = true
+ }
+
+}
diff --git a/views/EmojiCompat/kotlinApp/src/main/java/com/example/android/emojicompat/MainActivity.kt b/views/EmojiCompat/kotlinApp/src/main/java/com/example/android/emojicompat/MainActivity.kt
new file mode 100644
index 00000000..7cc90330
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/java/com/example/android/emojicompat/MainActivity.kt
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2017 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
+ *
+ * http://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.android.emojicompat
+
+import android.os.Bundle
+import android.support.text.emoji.EmojiCompat
+import android.support.v7.app.AppCompatActivity
+import android.widget.TextView
+
+
+class MainActivity : AppCompatActivity() {
+
+ companion object {
+ // [U+1F469] (WOMAN) + [U+200D] (ZERO WIDTH JOINER) + [U+1F4BB] (PERSONAL COMPUTER)
+ private val WOMAN_TECHNOLOGIST = "\uD83D\uDC69\u200D\uD83D\uDCBB"
+
+ // [U+1F469] (WOMAN) + [U+200D] (ZERO WIDTH JOINER) + [U+1F3A4] (MICROPHONE)
+ private val WOMAN_SINGER = "\uD83D\uDC69\u200D\uD83C\uDFA4"
+
+ @JvmField
+ val EMOJI = WOMAN_TECHNOLOGIST + " " + WOMAN_SINGER
+ }
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_main)
+
+ // TextView variant provided by EmojiCompat library
+ val emojiTextView: TextView = findViewById(R.id.emoji_text_view)
+ emojiTextView.text = getString(R.string.emoji_text_view, EMOJI)
+
+ // EditText variant provided by EmojiCompat library
+ val emojiEditText: TextView = findViewById(R.id.emoji_edit_text)
+ emojiEditText.text = getString(R.string.emoji_edit_text, EMOJI)
+
+ // Button variant provided by EmojiCompat library
+ val emojiButton: TextView = findViewById(R.id.emoji_button)
+ emojiButton.text = getString(R.string.emoji_button, EMOJI)
+
+ // Regular TextView without EmojiCompat support; you have to manually process the text
+ val regularTextView: TextView = findViewById(R.id.regular_text_view)
+ EmojiCompat.get().registerInitCallback(object : EmojiCompat.InitCallback() {
+ override fun onInitialized() {
+ val compat = EmojiCompat.get()
+ regularTextView.text = compat.process(getString(R.string.regular_text_view, EMOJI))
+ }
+ })
+
+ // Custom TextView
+ val customTextView: TextView = findViewById(R.id.emoji_custom_text_view)
+ customTextView.text = getString(R.string.custom_text_view, EMOJI)
+ }
+
+}
diff --git a/views/EmojiCompat/kotlinApp/src/main/res/layout/activity_main.xml b/views/EmojiCompat/kotlinApp/src/main/res/layout/activity_main.xml
new file mode 100644
index 00000000..5be684f5
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/res/layout/activity_main.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2017 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
+
+ http://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.
+-->
+
+<ScrollView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/scroll"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context="com.example.android.emojicompat.MainActivity">
+
+ <LinearLayout
+ android:id="@+id/container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:padding="@dimen/spacing_normal">
+
+ <android.support.text.emoji.widget.EmojiAppCompatTextView
+ android:id="@+id/emoji_text_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/spacing_small"
+ android:textSize="@dimen/text_size"/>
+
+ <android.support.text.emoji.widget.EmojiAppCompatEditText
+ android:id="@+id/emoji_edit_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/spacing_small"
+ android:textSize="@dimen/text_size"/>
+
+ <android.support.text.emoji.widget.EmojiAppCompatButton
+ android:id="@+id/emoji_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/spacing_small"
+ android:textSize="@dimen/text_size"/>
+
+ <TextView
+ android:id="@+id/regular_text_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/spacing_small"
+ android:textSize="@dimen/text_size"/>
+
+ <com.example.android.emojicompat.CustomTextView
+ android:id="@+id/emoji_custom_text_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="@dimen/text_size"/>
+
+ </LinearLayout>
+
+</ScrollView>
diff --git a/views/EmojiCompat/kotlinApp/src/main/res/mipmap-hdpi/ic_launcher.png b/views/EmojiCompat/kotlinApp/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 00000000..9e0d97a9
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/res/mipmap-hdpi/ic_launcher.png
Binary files differ
diff --git a/views/EmojiCompat/kotlinApp/src/main/res/mipmap-mdpi/ic_launcher.png b/views/EmojiCompat/kotlinApp/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 00000000..79d226b3
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/res/mipmap-mdpi/ic_launcher.png
Binary files differ
diff --git a/views/EmojiCompat/kotlinApp/src/main/res/mipmap-xhdpi/ic_launcher.png b/views/EmojiCompat/kotlinApp/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 00000000..42716ab9
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary files differ
diff --git a/views/EmojiCompat/kotlinApp/src/main/res/mipmap-xxhdpi/ic_launcher.png b/views/EmojiCompat/kotlinApp/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 00000000..4be1ff9b
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/views/EmojiCompat/kotlinApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/views/EmojiCompat/kotlinApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 00000000..ea78de30
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary files differ
diff --git a/views/EmojiCompat/kotlinApp/src/main/res/values/colors.xml b/views/EmojiCompat/kotlinApp/src/main/res/values/colors.xml
new file mode 100644
index 00000000..98ea8fa3
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/res/values/colors.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2017 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
+
+ http://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.
+-->
+<resources>
+ <color name="primary">#3F51B5</color>
+ <color name="primary_dark">#303F9F</color>
+ <color name="accent">#009688</color>
+</resources>
diff --git a/views/EmojiCompat/kotlinApp/src/main/res/values/dimens.xml b/views/EmojiCompat/kotlinApp/src/main/res/values/dimens.xml
new file mode 100644
index 00000000..04e76f04
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/res/values/dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2017 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
+
+ http://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.
+-->
+<resources>
+ <dimen name="spacing_normal">16dp</dimen>
+ <dimen name="spacing_small">8dp</dimen>
+ <dimen name="text_size">20sp</dimen>
+</resources>
diff --git a/views/EmojiCompat/kotlinApp/src/main/res/values/font_certs.xml b/views/EmojiCompat/kotlinApp/src/main/res/values/font_certs.xml
new file mode 100644
index 00000000..d63462fc
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/res/values/font_certs.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2017 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
+
+ http://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.
+-->
+<resources>
+ <array name="com_google_android_gms_fonts_certs">
+ <item>@array/com_google_android_gms_fonts_certs_dev</item>
+ <item>@array/com_google_android_gms_fonts_certs_prod</item>
+ </array>
+ <string-array name="com_google_android_gms_fonts_certs_dev">
+ <item>
+ MIIEqDCCA5CgAwIBAgIJANWFuGx90071MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAeFw0wODA0MTUyMzM2N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YXtqw/A0LFFtqoZKFjnkCAQOjgdkwgdYwHQYDVR0OBBYEFMd9jMIhF1Ylmn/Tgt9r45jk14alMIGmBgNVHSMEgZ4wgZuAFMd9jMIhF1Ylmn/Tgt9r45jk14aloXikdjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4xEDAOBgNVBAsTB0FuZHJvaWQxEDAOBgNVBAMTB0FuZHJvaWSCCQDC4IdGZEowjTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IBAQBt0lLO74UwLDYKqs6Tm8/yzKkEu116FmH4rkaymUIE0P9KaMftGlMexFlaYjzmB2OxZyl6euNXEsQH8gjwyxCUKRJNexBiGcCEyj6z+a1fuHHvkiaai+KL8W1EyNmgjmyy8AW7P+LLlkR+ho5zEHatRbM/YAnqGcFh5iZBqpknHf1SKMXFh4dd239FJ1jWYfbMDMy3NS5CTMQ2XFI1MvcyUTdZPErjQfTbQe3aDQsQcafEQPD+nqActifKZ0Np0IS9L9kR/wbNvyz6ENwPiTrjV2KRkEjH78ZMcUQXg0L3BYHJ3lc69Vs5Ddf9uUGGMYldX3WfMBEmh/9iFBDAaTCK
+ </item>
+ </string-array>
+</resources>
diff --git a/views/EmojiCompat/kotlinApp/src/main/res/values/strings.xml b/views/EmojiCompat/kotlinApp/src/main/res/values/strings.xml
new file mode 100644
index 00000000..ed7068ce
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/res/values/strings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2017 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
+
+ http://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.
+-->
+<resources>
+ <string name="app_name">EmojiCompat</string>
+ <string name="emoji_text_view">Emoji TextView %s</string>
+ <string name="emoji_edit_text">Emoji EditText %s</string>
+ <string name="emoji_button">Emoji Button %s</string>
+ <string name="regular_text_view">Regular TextView %s</string>
+ <string name="custom_text_view">Custom TextView %s</string>
+</resources>
diff --git a/views/EmojiCompat/kotlinApp/src/main/res/values/styles.xml b/views/EmojiCompat/kotlinApp/src/main/res/values/styles.xml
new file mode 100644
index 00000000..e09b3882
--- /dev/null
+++ b/views/EmojiCompat/kotlinApp/src/main/res/values/styles.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2017 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
+
+ http://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.
+-->
+<resources>
+
+ <style name="Theme.EmojiCompat" parent="Theme.AppCompat.Light.DarkActionBar">
+ <item name="colorPrimary">@color/primary</item>
+ <item name="colorPrimaryDark">@color/primary_dark</item>
+ <item name="colorAccent">@color/accent</item>
+ </style>
+
+</resources>
diff --git a/views/EmojiCompat/settings.gradle b/views/EmojiCompat/settings.gradle
index e7b4def4..9df712ea 100644
--- a/views/EmojiCompat/settings.gradle
+++ b/views/EmojiCompat/settings.gradle
@@ -1 +1,2 @@
include ':app'
+include ':kotlinApp'