├── .gitignore
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── cn
│ │ └── hadcn
│ │ └── keyboard_example
│ │ └── ApplicationTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── assets
│ │ └── emoticons
│ │ │ ├── emoji
│ │ │ ├── config.xml
│ │ │ ├── emoji_1.png
│ │ │ ├── emoji_10.png
│ │ │ ├── emoji_11.png
│ │ │ ├── emoji_12.png
│ │ │ ├── emoji_13.png
│ │ │ ├── emoji_14.png
│ │ │ ├── emoji_15.png
│ │ │ ├── emoji_16.png
│ │ │ ├── emoji_17.png
│ │ │ ├── emoji_18.png
│ │ │ ├── emoji_19.png
│ │ │ ├── emoji_2.png
│ │ │ ├── emoji_20.png
│ │ │ ├── emoji_21.png
│ │ │ ├── emoji_22.png
│ │ │ ├── emoji_23.png
│ │ │ ├── emoji_24.png
│ │ │ ├── emoji_25.png
│ │ │ ├── emoji_26.png
│ │ │ ├── emoji_27.png
│ │ │ ├── emoji_28.png
│ │ │ ├── emoji_29.png
│ │ │ ├── emoji_3.png
│ │ │ ├── emoji_30.png
│ │ │ ├── emoji_31.png
│ │ │ ├── emoji_32.png
│ │ │ ├── emoji_33.png
│ │ │ ├── emoji_34.png
│ │ │ ├── emoji_35.png
│ │ │ ├── emoji_36.png
│ │ │ ├── emoji_37.png
│ │ │ ├── emoji_38.png
│ │ │ ├── emoji_39.png
│ │ │ ├── emoji_4.png
│ │ │ ├── emoji_40.png
│ │ │ ├── emoji_41.png
│ │ │ ├── emoji_42.png
│ │ │ ├── emoji_43.png
│ │ │ ├── emoji_44.png
│ │ │ ├── emoji_45.png
│ │ │ ├── emoji_46.png
│ │ │ ├── emoji_47.png
│ │ │ ├── emoji_48.png
│ │ │ ├── emoji_49.png
│ │ │ ├── emoji_5.png
│ │ │ ├── emoji_50.png
│ │ │ ├── emoji_6.png
│ │ │ ├── emoji_7.png
│ │ │ ├── emoji_8.png
│ │ │ ├── emoji_9.png
│ │ │ └── emoji_icon.png
│ │ │ ├── list
│ │ │ ├── tusiji
│ │ │ ├── config.xml
│ │ │ ├── icon_002_cover.png
│ │ │ ├── icon_007_cover.png
│ │ │ ├── icon_010_cover.png
│ │ │ ├── icon_012_cover.png
│ │ │ ├── icon_013_cover.png
│ │ │ ├── icon_018_cover.png
│ │ │ ├── icon_019_cover.png
│ │ │ ├── icon_020_cover.png
│ │ │ ├── icon_021_cover.png
│ │ │ ├── icon_022_cover.png
│ │ │ ├── icon_024_cover.png
│ │ │ ├── icon_027_cover.png
│ │ │ ├── icon_029_cover.png
│ │ │ ├── icon_030_cover.png
│ │ │ ├── icon_035_cover.png
│ │ │ └── icon_040_cover.png
│ │ │ └── xhs
│ │ │ ├── config.xml
│ │ │ ├── xhsemoji_1.png
│ │ │ ├── xhsemoji_10.png
│ │ │ ├── xhsemoji_11.png
│ │ │ ├── xhsemoji_12.png
│ │ │ ├── xhsemoji_13.png
│ │ │ ├── xhsemoji_14.png
│ │ │ ├── xhsemoji_15.png
│ │ │ ├── xhsemoji_16.png
│ │ │ ├── xhsemoji_17.png
│ │ │ ├── xhsemoji_18.png
│ │ │ ├── xhsemoji_19.png
│ │ │ ├── xhsemoji_2.png
│ │ │ ├── xhsemoji_20.png
│ │ │ ├── xhsemoji_21.png
│ │ │ ├── xhsemoji_3.png
│ │ │ ├── xhsemoji_4.png
│ │ │ ├── xhsemoji_5.png
│ │ │ ├── xhsemoji_6.png
│ │ │ ├── xhsemoji_7.png
│ │ │ ├── xhsemoji_8.png
│ │ │ └── xhsemoji_9.png
│ ├── java
│ │ └── cn
│ │ │ └── hadcn
│ │ │ └── keyboard_example
│ │ │ ├── AudioLib.java
│ │ │ ├── ChatBean.java
│ │ │ ├── LogUtil.java
│ │ │ ├── MainActivity.java
│ │ │ ├── MainApplication.java
│ │ │ └── SimpleChatAdapter.java
│ └── res
│ │ ├── drawable-hdpi
│ │ ├── addpic.png
│ │ ├── emoji.png
│ │ ├── keyboard.png
│ │ ├── pic_select_n.png
│ │ ├── qbi.png
│ │ └── voice.png
│ │ ├── drawable
│ │ ├── icon_camera.png
│ │ ├── icon_photo.png
│ │ ├── keyboard_emoticon_selector.xml
│ │ └── send_button_bg.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ └── item_list.xml
│ │ ├── menu
│ │ └── menu_main.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ ├── values-w820dp
│ │ ├── arrays.xml
│ │ └── dimens.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── cn
│ └── hadcn
│ └── keyboard_example
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── keyboard
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── cn
│ │ └── hadcn
│ │ └── keyboard
│ │ └── ApplicationTest.java
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── cn
│ │ └── hadcn
│ │ └── keyboard
│ │ ├── ChatKeyboardLayout.java
│ │ ├── ChatTextView.java
│ │ ├── EmoticonEntity.java
│ │ ├── RecordingLayout.java
│ │ ├── emoticon
│ │ ├── EmoticonBean.java
│ │ ├── EmoticonSetBean.java
│ │ ├── db
│ │ │ ├── EmoticonDBHelper.java
│ │ │ └── TableColumns.java
│ │ ├── util
│ │ │ ├── DefEmoticons.java
│ │ │ ├── EmoticonHandler.java
│ │ │ └── EmoticonsKeyboardBuilder.java
│ │ └── view
│ │ │ ├── EmoticonLayout.java
│ │ │ ├── EmoticonsAdapter.java
│ │ │ ├── EmoticonsPageView.java
│ │ │ └── EmoticonsTabBarView.java
│ │ ├── media
│ │ ├── MediaBean.java
│ │ ├── MediaGridAdapter.java
│ │ ├── MediaLayout.java
│ │ └── MediaPagerAdapter.java
│ │ ├── utils
│ │ ├── EmoticonBase.java
│ │ ├── EmoticonLoader.java
│ │ ├── HadLog.java
│ │ └── Utils.java
│ │ └── view
│ │ ├── HadEditText.java
│ │ ├── IndicatorView.java
│ │ ├── SoftHandleLayout.java
│ │ ├── SoftListenLayout.java
│ │ └── VerticalImageSpan.java
│ └── res
│ ├── drawable-hdpi
│ ├── emoji_0x1f319.png
│ ├── emoji_0x1f31f.png
│ ├── emoji_0x1f339.png
│ ├── emoji_0x1f33b.png
│ ├── emoji_0x1f341.png
│ ├── emoji_0x1f343.png
│ ├── emoji_0x1f37a.png
│ ├── emoji_0x1f380.png
│ ├── emoji_0x1f381.png
│ ├── emoji_0x1f382.png
│ ├── emoji_0x1f385.png
│ ├── emoji_0x1f3e0.png
│ ├── emoji_0x1f431.png
│ ├── emoji_0x1f436.png
│ ├── emoji_0x1f444.png
│ ├── emoji_0x1f446.png
│ ├── emoji_0x1f447.png
│ ├── emoji_0x1f448.png
│ ├── emoji_0x1f449.png
│ ├── emoji_0x1f44a.png
│ ├── emoji_0x1f44c.png
│ ├── emoji_0x1f44d.png
│ ├── emoji_0x1f44e.png
│ ├── emoji_0x1f44f.png
│ ├── emoji_0x1f457.png
│ ├── emoji_0x1f466.png
│ ├── emoji_0x1f467.png
│ ├── emoji_0x1f468.png
│ ├── emoji_0x1f469.png
│ ├── emoji_0x1f47b.png
│ ├── emoji_0x1f47f.png
│ ├── emoji_0x1f48e.png
│ ├── emoji_0x1f494.png
│ ├── emoji_0x1f4a3.png
│ ├── emoji_0x1f4aa.png
│ ├── emoji_0x1f4f1.png
│ ├── emoji_0x1f50d.png
│ ├── emoji_0x1f559.png
│ ├── emoji_0x1f601.png
│ ├── emoji_0x1f602.png
│ ├── emoji_0x1f603.png
│ ├── emoji_0x1f604.png
│ ├── emoji_0x1f609.png
│ ├── emoji_0x1f60a.png
│ ├── emoji_0x1f60c.png
│ ├── emoji_0x1f60d.png
│ ├── emoji_0x1f60f.png
│ ├── emoji_0x1f612.png
│ ├── emoji_0x1f613.png
│ ├── emoji_0x1f614.png
│ ├── emoji_0x1f616.png
│ ├── emoji_0x1f618.png
│ ├── emoji_0x1f61a.png
│ ├── emoji_0x1f61c.png
│ ├── emoji_0x1f61d.png
│ ├── emoji_0x1f61e.png
│ ├── emoji_0x1f620.png
│ ├── emoji_0x1f621.png
│ ├── emoji_0x1f622.png
│ ├── emoji_0x1f623.png
│ ├── emoji_0x1f625.png
│ ├── emoji_0x1f628.png
│ ├── emoji_0x1f62a.png
│ ├── emoji_0x1f62d.png
│ ├── emoji_0x1f630.png
│ ├── emoji_0x1f631.png
│ ├── emoji_0x1f632.png
│ ├── emoji_0x1f633.png
│ ├── emoji_0x1f637.png
│ ├── emoji_0x1f64f.png
│ ├── emoji_0x1f697.png
│ ├── emoji_0x2600.png
│ ├── emoji_0x2601.png
│ ├── emoji_0x2614.png
│ ├── emoji_0x2615.png
│ ├── emoji_0x26a1.png
│ ├── emoji_0x26bd.png
│ ├── emoji_0x270a.png
│ ├── emoji_0x270c.png
│ ├── emoji_0x2764.png
│ ├── icon_del.png
│ ├── icon_emoji.png
│ ├── icon_face_normal.png
│ ├── icon_face_pop.png
│ ├── input_bar_flat.png
│ ├── input_bg.9.png
│ ├── input_bg_gray.9.png
│ ├── input_bg_green.9.png
│ ├── recording_cancel.png
│ ├── recording_level_1.png
│ ├── recording_level_2.png
│ ├── recording_level_3.png
│ ├── recording_level_4.png
│ ├── recording_level_5.png
│ ├── recording_level_6.png
│ ├── recording_level_7.png
│ └── recording_mic.png
│ ├── drawable-xhdpi
│ ├── default_keyboard_icon.png
│ ├── default_record_icon.png
│ └── default_right_icon.png
│ ├── drawable
│ ├── btn_input_bg.xml
│ ├── btn_voice_press.xml
│ ├── circle_button_bg.xml
│ ├── emoticon_bg.xml
│ ├── indicator_point_normal.xml
│ ├── indicator_point_select.xml
│ ├── keyboard_face_icon.xml
│ ├── media_image_bg.xml
│ ├── recording_bg.xml
│ ├── recording_n.xml
│ ├── recording_p.xml
│ ├── recording_text_bg.xml
│ ├── send_button_bg.xml
│ └── transparent_bg.xml
│ ├── layout
│ ├── keyboard_bar_layout.xml
│ ├── keyboard_emoticon_item.xml
│ ├── keyboard_emoticon_layout.xml
│ ├── keyboard_emoticon_tabbar.xml
│ ├── keyboard_emoticon_tabbar_item.xml
│ ├── keyboard_media_item.xml
│ ├── keyboard_media_layout.xml
│ ├── keyboard_media_page.xml
│ └── keyboard_recording_layout.xml
│ ├── values-zh-rTW
│ └── strings.xml
│ └── values
│ ├── attrs.xml
│ ├── colors.xml
│ ├── dimens.xml
│ ├── ids.xml
│ └── strings.xml
├── raw
├── chat_style.png
├── text_emoticon.png
└── text_only.png
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea
4 | .DS_Store
5 | /build
6 | /captures
7 | .idea
8 | *.iml
9 | /app/*.iml
10 | /keyboard/*.iml
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # ChatKeyboard [](https://github.com/CPPAlien/ChatKeyboard)
4 |
5 | ChatKeyboard is a powerful and easy using keyboard lib for Android, includes emoticons selection, audio recording, multi media functions, etc.
6 |
7 | - Let the lib handle the difficult keyboard actions, you just need listen the the results you want.
8 | - Apply different styles of the keyboard.
9 | - Custom your own icons in keyboard and the click action.
10 | - More to find out by yourself.
11 |
12 |
13 | ### Demo
14 |
15 |

16 |
17 |
18 | [Apk Download](http://cdn.flowergo.xyz/keyboard_new.apk)
19 |
20 | ### Import
21 |
22 | Gradle:
23 |
24 | dependencies {
25 | compile 'me.pengtao:ChatKeyboard:2.0.0'
26 | }
27 |
28 | If the jcenter is not ok, you can use jitpack way as below.
29 |
30 | ```
31 | repositories{
32 | maven { url "https://jitpack.io" }
33 | }
34 | dependencies {
35 | compile 'com.github.CPPAlien:ChatKeyboard:1.0.1'
36 | }
37 | ```
38 | Latest Version:[](https://jitpack.io/#CPPAlien/ChatKeyboard)
39 |
40 | ### How to use
41 |
42 | #### 1, ChatKeyboardLayout
43 |
44 | make your layout get keyboard ability.
45 |
46 | ```
47 |
56 | ...your layout
57 |
58 | ```
59 | **Notice: You can only put one child view in ChatKeyboardLayout.**
60 |
61 |
62 |
63 | #### 2, Style and Custom
64 |
65 | There are three styles you can set.
66 |
67 |
68 | | chat_style | text_emoticon | text_only |
69 | | :---------------------: | :------------------------: | :--------------------: |
70 | |  |  |  |
71 |
72 |
73 | You can use `app:keyboardStyle` in xml to set or `setKeyboardStyle(@KeyboardStyle int style)` method to set, once you set, the keyboard style will change.
74 |
75 | There are also some attributes you can custom the icons.
76 |
77 | `app:sendButtonBackground` custom send button background
78 |
79 | `app:faceIcon` custom keyboard bar face icon, you can use `state_selected` to distinguish emoticon layout pop or not state.
80 |
81 | `app:showRightIcon` when you set the style as `chat_style`, the right place will just show send button in default, you should set this attribute as `true` to show the right multi media icon.
82 |
83 | … more you need find out yourself in demo.
84 |
85 |
86 |
87 | #### 3, Emoticons and Stickers
88 |
89 | ```java
90 | if (!ChatKeyboardLayout.isEmoticonInitSuccess(this)) {
91 | List entities = new ArrayList<>();
92 | entities.add(new EmoticonEntity("emoticons/xhs", EmoticonBase.Scheme.ASSETS));
93 | entities.add(new EmoticonEntity("emoticons/tusiji", EmoticonBase.Scheme.ASSETS));
94 | ChatKeyboardLayout.initEmoticonsDB(this, true, entities);
95 | }
96 | ```
97 | **Notice: Add the code above before the ChatKeyboardLayout used, better in onCreate of Application**
98 |
99 |
100 |
101 | #### 4, Keyboard Listener
102 |
103 | ```java
104 | public interface OnChatKeyBoardListener {
105 | /**
106 | * When send button clicked
107 | *
108 | * @param text content in input area
109 | */
110 | void onSendButtonClicked(String text);
111 |
112 | /**
113 | * When user input or delete text in input area
114 | *
115 | * @param text changing text
116 | */
117 | void onInputTextChanged(String text);
118 |
119 | /**
120 | * Recording button action {@link RecordingAction}
121 | *
122 | * @param action action
123 | */
124 | void onRecordingAction(RecordingAction action);
125 |
126 | /**
127 | * When sticker defined by developer clicked
128 | *
129 | * @param tag sticker tag
130 | * @param uri sticker location uri
131 | */
132 | void onUserDefEmoticonClicked(String tag, String uri);
133 |
134 | /**
135 | * when keyboard popped or back, get the pixels of the height include keyboard bar
136 | *
137 | * @param height pixel height
138 | */
139 | void onKeyboardHeightChanged(int height);
140 |
141 | /**
142 | * when left icon clicked, this will be called
143 | *
144 | * @param view view of clicked
145 | * @return true, won't execute default actions; false, execute default actions
146 | */
147 | boolean onLeftIconClicked(View view);
148 |
149 | /**
150 | * when right icon clicked, this will be called
151 | *
152 | * @param view view of clicked
153 | * @return true, won't execute default actions; false, execute default actions
154 | */
155 | boolean onRightIconClicked(View view);
156 | }
157 | ```
158 | You can use `SimpleOnChatKeyboardListener` instead of the interface above, so you can just implement these call back method you use.
159 |
160 |
161 |
162 | ### These you should know
163 |
164 | 1. Make sure the bottom of `ChatKeyboardLayout` align the screen bottom.
165 | 2. Make sure the height of `ChatKeyboardLayout` be at least 2/3 of you screen height.
166 |
167 | ### Other usage
168 |
169 | Please refer to the demo code
170 |
171 |
172 |
173 | ## Thanks
174 |
175 | Thanks for [xhsEmoticonsKeyboard](https://github.com/w446108264/XhsEmoticonsKeyboard) powered by w446108264 which is inspired me.
176 |
177 |
178 |
179 | ## License
180 |
181 | ```
182 | Copyright (c) 2017 CPPAlien
183 |
184 | Licensed under the Apache License, Version 2.0 (the "License");
185 | you may not use this file except in compliance with the License.
186 | You may obtain a copy of the License at
187 |
188 | http://www.apache.org/licenses/LICENSE-2.0
189 |
190 | Unless required by applicable law or agreed to in writing, software
191 | distributed under the License is distributed on an "AS IS" BASIS,
192 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
193 | See the License for the specific language governing permissions and
194 | limitations under the License.
195 | ```
196 |
197 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 27
5 | buildToolsVersion "26.0.2"
6 |
7 | defaultConfig {
8 | applicationId "cn.hadcn.keyboard_example"
9 | minSdkVersion 16
10 | targetSdkVersion 27
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | lintOptions {
21 | abortOnError false
22 | }
23 | }
24 |
25 | dependencies {
26 | compile fileTree(dir: 'libs', include: ['*.jar'])
27 | testCompile 'junit:junit:4.12'
28 | compile 'com.android.support:appcompat-v7:27.1.1'
29 | compile project(':keyboard')
30 | }
31 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\Coding\android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/cn/hadcn/keyboard_example/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard_example;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
12 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_1.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_10.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_11.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_12.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_13.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_14.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_15.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_16.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_17.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_18.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_19.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_2.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_20.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_21.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_22.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_23.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_24.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_25.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_25.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_26.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_26.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_27.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_28.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_28.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_29.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_3.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_30.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_31.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_31.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_32.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_33.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_33.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_34.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_34.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_35.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_35.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_36.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_37.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_37.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_38.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_39.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_39.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_4.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_40.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_41.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_41.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_42.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_43.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_43.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_44.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_44.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_45.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_45.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_46.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_46.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_47.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_47.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_48.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_49.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_49.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_5.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_50.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_6.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_7.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_8.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_9.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/emoji/emoji_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/emoji/emoji_icon.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/list:
--------------------------------------------------------------------------------
1 | ["qbi"]
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | tusiji
4 | 2
5 | 4
6 | 1
7 | icon_030_cover.png
8 | 0
9 | 30
10 | 0
11 | 0
12 |
13 |
14 | 2
15 | icon_002_cover.png
16 | 哭
17 | tusiji_cry
18 |
19 |
20 | 2
21 | icon_007_cover.png
22 | 嘚瑟
23 | tusiji_dese
24 |
25 |
26 | 2
27 | icon_010_cover.png
28 | 手舞足蹈
29 | tusiji_dance
30 |
31 |
32 | 2
33 | icon_012_cover.png
34 | 叮铃
35 | tusiji_dingling
36 |
37 |
38 | 2
39 | icon_013_cover.png
40 | 拜拜
41 | tusiji_bye
42 |
43 |
44 | 2
45 | icon_018_cover.png
46 | 闪亮
47 | tusiji_shining
48 |
49 |
50 | 2
51 | icon_019_cover.png
52 | 抱奶瓶
53 | tusiji_milk
54 |
55 |
56 | 2
57 | icon_020_cover.png
58 | 晚安
59 | tusiji_goodnight
60 |
61 |
62 | 2
63 | icon_021_cover.png
64 | 飞吻
65 | tusiji_kiss
66 |
67 |
68 | 2
69 | icon_022_cover.png
70 | 切
71 | tusiji_qie
72 |
73 |
74 | 2
75 | icon_024_cover.png
76 | 使劲摇
77 | tusiji_shake
78 |
79 |
80 | 2
81 | icon_027_cover.png
82 | 生日快乐
83 | tusiji_happybirthday
84 |
85 |
86 | 2
87 | icon_029_cover.png
88 | 我最帅
89 | tusiji_handsome
90 |
91 |
92 | 2
93 | icon_030_cover.png
94 | 抓墙
95 | tusiji_zhuaqiang
96 |
97 |
98 | 2
99 | icon_035_cover.png
100 | 扭屁股
101 | tusiji_niupigu
102 |
103 |
104 | 2
105 | icon_040_cover.png
106 | 印度舞
107 | tusiji_india
108 |
109 |
110 |
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_002_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_002_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_007_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_007_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_010_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_010_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_012_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_012_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_013_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_013_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_018_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_018_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_019_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_019_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_020_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_020_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_021_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_021_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_022_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_022_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_024_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_024_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_027_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_027_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_029_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_029_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_030_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_030_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_035_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_035_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/tusiji/icon_040_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/tusiji/icon_040_cover.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/config.xml:
--------------------------------------------------------------------------------
1 |
2 | xhs
3 | 3
4 | 7
5 | xhsemoji_19.png
6 | 0
7 | 1
8 | 20
9 | 0
10 | 0
11 |
12 |
13 | 0
14 | xhsemoji_1.png
15 | 生气
16 | [生气]
17 |
18 |
19 | 0
20 | xhsemoji_2.png
21 | 生气
22 | [生气]
23 |
24 |
25 | 0
26 | xhsemoji_3.png
27 | 晕
28 | [晕]
29 |
30 |
31 | 0
32 | xhsemoji_4.png
33 | 酷
34 | [酷]
35 |
36 |
37 | 0
38 | xhsemoji_5.png
39 | 哭
40 | [哭]
41 |
42 |
43 | 0
44 | xhsemoji_6.png
45 | 可爱
46 | [可爱]
47 |
48 |
49 | 0
50 | xhsemoji_7.png
51 | 抠鼻
52 | [抠鼻]
53 |
54 |
55 | 0
56 | xhsemoji_8.png
57 | 昏掉
58 | [昏掉]
59 |
60 |
61 | 0
62 | xhsemoji_9.png
63 | 寒冷
64 | [寒冷]
65 |
66 |
67 | 0
68 | xhsemoji_10.png
69 | 哈哈
70 | [哈哈]
71 |
72 |
73 | 0
74 | xhsemoji_11.png
75 | 无语
76 | [无语]
77 |
78 |
79 | 0
80 | xhsemoji_12.png
81 | 亲亲
82 | [亲亲]
83 |
84 |
85 | 0
86 | xhsemoji_13.png
87 | 闪亮
88 | [闪亮]
89 |
90 |
91 | 0
92 | xhsemoji_14.png
93 | 爆炸
94 | [爆炸]
95 |
96 |
97 | 0
98 | xhsemoji_15.png
99 | 问号
100 | [问号]
101 |
102 |
103 | 0
104 | xhsemoji_16.png
105 | 绅士
106 | [绅士]
107 |
108 |
109 | 0
110 | xhsemoji_17.png
111 | 啊啊
112 | [啊啊]
113 |
114 |
115 | 0
116 | xhsemoji_18.png
117 | 闭嘴
118 | [闭嘴]
119 |
120 |
121 | 0
122 | xhsemoji_19.png
123 | 爱心
124 | [爱心]
125 |
126 |
127 | 0
128 | xhsemoji_20.png
129 | 窃喜
130 | [窃喜]
131 |
132 |
133 | 0
134 | xhsemoji_21.png
135 | 大笑
136 | [大笑]
137 |
138 |
139 |
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_1.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_10.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_11.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_12.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_13.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_14.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_15.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_16.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_17.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_18.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_19.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_2.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_20.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_21.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_3.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_4.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_5.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_6.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_7.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_8.png
--------------------------------------------------------------------------------
/app/src/main/assets/emoticons/xhs/xhsemoji_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/assets/emoticons/xhs/xhsemoji_9.png
--------------------------------------------------------------------------------
/app/src/main/java/cn/hadcn/keyboard_example/AudioLib.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard_example;
2 |
3 | import android.content.Context;
4 | import android.media.MediaPlayer;
5 | import android.media.MediaRecorder;
6 | import android.os.Handler;
7 |
8 | import java.io.File;
9 | import java.io.IOException;
10 | import java.util.Timer;
11 | import java.util.TimerTask;
12 |
13 | /**
14 | * AudioLib
15 | * Created by 90Chris on 2015/12/2.
16 | */
17 | public class AudioLib {
18 | private static final String TAG = "AudioLib";
19 | private static AudioLib sAudioLib = null;
20 | private MediaRecorder recorder;
21 | private String mPath;
22 | private int mPeriod = 0;
23 | private static final int MIN_LENGTH = 2;
24 |
25 | public static AudioLib getInstance() {
26 | if (sAudioLib == null) {
27 | sAudioLib = new AudioLib();
28 | }
29 | return sAudioLib;
30 | }
31 |
32 | public AudioLib() {
33 | new Timer().schedule(new AudioTimerTask(), 0, 1000);
34 | }
35 |
36 | private class AudioTimerTask extends TimerTask {
37 | @Override
38 | public void run() {
39 | ++mPeriod;
40 | }
41 | }
42 |
43 | public synchronized void start(String path, OnAudioListener listener) {
44 | LogUtil.d(TAG, "start recording");
45 | mPeriod = 0;
46 |
47 | mListener = listener;
48 | recorder = new MediaRecorder();
49 | recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
50 | recorder.setOutputFormat(MediaRecorder.OutputFormat.AMR_NB);
51 | recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
52 | recorder.setOutputFile(path);
53 |
54 | try {
55 | recorder.prepare();
56 | recorder.start();
57 | updateMicStatus();
58 | LogUtil.d(TAG, "record start success");
59 | } catch (IllegalStateException e) {
60 | LogUtil.e(TAG, "IllegalStateException", e);
61 | } catch (IOException e) {
62 | LogUtil.e(TAG, "IOException", e);
63 | }
64 |
65 | mPath = path;
66 | }
67 |
68 | /**
69 | * cancel, not save the file
70 | *
71 | * @return true, cancel success, false, cancel failed
72 | */
73 | public synchronized boolean cancel() {
74 | LogUtil.d(TAG, "cancel recording");
75 | if (recorder == null) {
76 | LogUtil.e(TAG, "recorder is null ");
77 | return false;
78 | }
79 | try {
80 | stopRecord();
81 | } catch (IllegalStateException e) {
82 | LogUtil.e(TAG, "illegal state happened when cancel", e);
83 | }
84 |
85 | File file = new File(mPath);
86 | return file.exists() && file.delete();
87 | }
88 |
89 | /**
90 | * complete the recording
91 | *
92 | * @return recording last time
93 | */
94 | public synchronized int complete() {
95 | LogUtil.i(TAG, "complete recording");
96 |
97 | if (recorder == null) {
98 | LogUtil.e(TAG, "recorder is null ");
99 | return -1;
100 | }
101 |
102 | try {
103 | stopRecord();
104 | } catch (IllegalStateException e) {
105 | LogUtil.e(TAG, "illegal state happened when complete", e);
106 | return -1;
107 | }
108 |
109 | if (mPeriod < MIN_LENGTH) {
110 | LogUtil.i(TAG, "record time is too short");
111 | return -1;
112 | }
113 |
114 | return mPeriod;
115 | }
116 |
117 | public String generatePath(Context context) {
118 | boolean isSuccess = true;
119 | final String cachePath = context.getCacheDir().getAbsolutePath() + File.separator +
120 | "audioCache";
121 | File file = new File(cachePath);
122 | if (!file.exists()) {
123 | isSuccess = file.mkdirs();
124 | }
125 | if (isSuccess) {
126 | return cachePath + File.separator + System.currentTimeMillis() + ".amr";
127 | } else {
128 | return null;
129 | }
130 | }
131 |
132 | private synchronized void stopRecord() {
133 | //mHandler.removeCallbacks(mUpdateMicStatusTimer);
134 |
135 | recorder.stop();
136 | recorder.release();
137 | recorder = null;
138 | }
139 |
140 | private final Handler mHandler = new Handler();
141 | private Runnable mUpdateMicStatusTimer = new Runnable() {
142 | public void run() {
143 | updateMicStatus();
144 | }
145 | };
146 |
147 | private void updateMicStatus() {
148 | if (recorder != null) {
149 | double ratio = (double) recorder.getMaxAmplitude();
150 | double db = 0;
151 | if (ratio > 1) {
152 | db = 20 * Math.log10(ratio);
153 | }
154 | if (mListener != null) {
155 | mListener.onDbChange(db);
156 | }
157 | mHandler.postDelayed(mUpdateMicStatusTimer, 500);
158 | }
159 | }
160 |
161 | private OnAudioListener mListener = null;
162 |
163 | public interface OnAudioListener {
164 | void onDbChange(double db);
165 | }
166 |
167 | private MediaPlayer mMediaPlayer = null;
168 | private String mCurrentPlayingAudioPath = null;
169 | private OnMediaPlayComplete mPlayListener = null;
170 |
171 | /**
172 | * play the audio
173 | *
174 | * @param path path of the audio file
175 | */
176 | public synchronized void playAudio(String path, OnMediaPlayComplete listener) {
177 | mPlayListener = listener;
178 | if (mMediaPlayer != null) {
179 | stopPlay();
180 | }
181 | mMediaPlayer = new MediaPlayer();
182 | mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
183 | @Override
184 | public void onCompletion(MediaPlayer mp) {
185 | stopPlay();
186 | if (mPlayListener != null) {
187 | mPlayListener.onPlayComplete(true);
188 | }
189 | }
190 | });
191 | try {
192 | mMediaPlayer.setDataSource(path);
193 | mMediaPlayer.prepare();
194 | } catch (IOException e) {
195 | mPlayListener.onPlayComplete(false);
196 | }
197 |
198 | mMediaPlayer.start();
199 |
200 | mCurrentPlayingAudioPath = path;
201 | }
202 |
203 | public synchronized void stopPlay() {
204 | mMediaPlayer.stop();
205 | mMediaPlayer.release();
206 | mMediaPlayer = null;
207 | mCurrentPlayingAudioPath = null;
208 | }
209 |
210 | public boolean isPlaying(String path) {
211 | return (mMediaPlayer != null) && mMediaPlayer.isPlaying() && (path.equals
212 | (mCurrentPlayingAudioPath));
213 | }
214 |
215 | public interface OnMediaPlayComplete {
216 | void onPlayComplete(boolean isSuccess);
217 | }
218 | }
219 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/hadcn/keyboard_example/ChatBean.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard_example;
2 |
3 | /**
4 | * ChatBean
5 | * Created by 90Chris on 2015/11/24.
6 | */
7 | public class ChatBean {
8 | private String tag;
9 | private String textMsg;
10 |
11 | public ChatBean(String tag, String textMsg) {
12 | this.tag = tag;
13 | this.textMsg = textMsg;
14 | }
15 |
16 | public String getTag() {
17 | return tag;
18 | }
19 |
20 | public String getTextMsg() {
21 | return textMsg;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/hadcn/keyboard_example/LogUtil.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard_example;
2 |
3 | import android.util.Log;
4 |
5 |
6 | /**
7 | * 自定义Log
8 | * @author 90Chris
9 | */
10 | public class LogUtil {
11 | public static final String LOG_TAG = "Keyboard:";
12 | private static boolean enableLogDisplay = true;//true: put on log display in logcat, put off it when release
13 |
14 | private static final int RETURN_NOLOG = 99;
15 |
16 | public static int d(String tag, String msg) {
17 | return enableLogDisplay ? Log.d(LOG_TAG + tag, msg) : RETURN_NOLOG;
18 | }
19 |
20 | public static int e(String tag, String msg) {
21 | return enableLogDisplay ? Log.e(LOG_TAG + tag, msg) : RETURN_NOLOG;
22 | }
23 |
24 | public static int e(String tag, String msg, Throwable e) {
25 | return enableLogDisplay ? Log.e(LOG_TAG + tag, msg, e) : RETURN_NOLOG;
26 | }
27 |
28 | public static int i(String tag, String msg) {
29 | return enableLogDisplay ? Log.i(LOG_TAG + tag, msg) : RETURN_NOLOG;
30 | }
31 |
32 | public static int w(String tag, String msg) {
33 | return enableLogDisplay ? Log.w(LOG_TAG + tag, msg) : RETURN_NOLOG;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/hadcn/keyboard_example/MainApplication.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard_example;
2 |
3 | import android.app.Application;
4 |
5 | import java.util.ArrayList;
6 | import java.util.List;
7 |
8 | import cn.hadcn.keyboard.ChatKeyboardLayout;
9 | import cn.hadcn.keyboard.EmoticonEntity;
10 | import cn.hadcn.keyboard.utils.EmoticonBase;
11 |
12 | /**
13 | * MainApplication
14 | * Created by 90Chris on 2015/10/8.
15 | */
16 | public class MainApplication extends Application {
17 | @Override
18 | public void onCreate() {
19 | super.onCreate();
20 |
21 | if (!ChatKeyboardLayout.isEmoticonsDBInitSuccess(this)) {
22 | List entities = new ArrayList<>();
23 | entities.add(new EmoticonEntity("emoticons/xhs", EmoticonBase.Scheme.ASSETS));
24 | entities.add(new EmoticonEntity("emoticons/tusiji", EmoticonBase.Scheme.ASSETS));
25 | entities.add(new EmoticonEntity("emoticons/emoji", EmoticonBase.Scheme.ASSETS));
26 | ChatKeyboardLayout.initEmoticonsDB(this, true, entities);
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/app/src/main/java/cn/hadcn/keyboard_example/SimpleChatAdapter.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard_example;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.BaseAdapter;
8 | import android.widget.ImageView;
9 | import android.widget.TextView;
10 |
11 | import java.util.ArrayList;
12 | import java.util.List;
13 |
14 | import cn.hadcn.keyboard.utils.EmoticonLoader;
15 |
16 | /**
17 | * SimpleChatAdapter
18 | * Created by 90Chris on 2015/11/24.
19 | */
20 | public class SimpleChatAdapter extends BaseAdapter {
21 |
22 | Context mContext;
23 | private List mChatBeans = new ArrayList<>();
24 |
25 | public SimpleChatAdapter(Context mContext) {
26 | this.mContext = mContext;
27 | }
28 |
29 | public void addItem(ChatBean bean) {
30 | mChatBeans.add(bean);
31 | notifyDataSetChanged();
32 | }
33 |
34 | @Override
35 | public int getCount() {
36 | return mChatBeans.size();
37 | }
38 |
39 | @Override
40 | public ChatBean getItem(int i) {
41 | return mChatBeans.get(i);
42 | }
43 |
44 | @Override
45 | public long getItemId(int i) {
46 | return i;
47 | }
48 |
49 | private static class ViewHolder {
50 | ImageView ivEmoticon;
51 | TextView tvTextMsg;
52 |
53 | public ViewHolder(View view) {
54 | ivEmoticon = (ImageView)view.findViewById(R.id.item_image);
55 | tvTextMsg = (TextView)view.findViewById(R.id.item_text);
56 | }
57 | }
58 |
59 | @Override
60 | public View getView(int i, View view, ViewGroup viewGroup) {
61 | ViewHolder viewHolder;
62 | if ( view == null ) {
63 | view = LayoutInflater.from(mContext).inflate(R.layout.item_list, viewGroup, false);
64 | viewHolder = new ViewHolder(view);
65 | view.setTag(viewHolder);
66 | } else {
67 | viewHolder = (ViewHolder)view.getTag();
68 | }
69 | if ( getItem(i).getTag() != null ) {
70 | viewHolder.ivEmoticon.setVisibility(View.VISIBLE);
71 | viewHolder.ivEmoticon.setImageDrawable(EmoticonLoader.getInstance(mContext).getDrawableByTag(getItem(i).getTag()));
72 | } else {
73 | viewHolder.ivEmoticon.setVisibility(View.GONE);
74 | }
75 |
76 | if ( getItem(i).getTextMsg() != null ) {
77 | viewHolder.tvTextMsg.setVisibility(View.VISIBLE);
78 | viewHolder.tvTextMsg.setText(getItem(i).getTextMsg());
79 | } else {
80 | viewHolder.tvTextMsg.setVisibility(View.GONE);
81 | }
82 |
83 | return view;
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/addpic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/res/drawable-hdpi/addpic.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/emoji.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/res/drawable-hdpi/emoji.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/keyboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/res/drawable-hdpi/keyboard.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/pic_select_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/res/drawable-hdpi/pic_select_n.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/qbi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/res/drawable-hdpi/qbi.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/voice.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/res/drawable-hdpi/voice.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/icon_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/res/drawable/icon_camera.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/icon_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/res/drawable/icon_photo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/keyboard_emoticon_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/send_button_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 | -
10 |
11 |
12 |
13 |
14 |
15 | -
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
5 |
10 |
23 |
28 |
29 |
35 |
39 |
45 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
9 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - 图片
5 | - 拍照
6 |
7 |
8 |
9 | - icon_photo
10 | - icon_camera
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | ChatKeyboard
3 |
4 | Hello world!
5 | text_only
6 | text_emoticon
7 | chat_style
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/test/java/cn/hadcn/keyboard_example/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard_example;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.0.1'
9 | classpath 'com.novoda:bintray-release:0.8.1'
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | ## Project-wide Gradle settings.
2 | #
3 | # For more details on how to configure your build environment visit
4 | # http://www.gradle.org/docs/current/userguide/build_environment.html
5 | #
6 | # Specifies the JVM arguments used for the daemon process.
7 | # The setting is particularly useful for tweaking memory settings.
8 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
9 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
10 | #
11 | # When configured, Gradle will run in incubating parallel mode.
12 | # This option should only be used with decoupled projects. More details, visit
13 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
14 | # org.gradle.parallel=true
15 | #Wed Mar 30 11:07:57 CST 2016
16 | systemProp.http.proxyHost=127.0.0.1
17 | systemProp.http.proxyPort=1080
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue May 29 12:24:04 CST 2018
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/keyboard/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/keyboard/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'com.novoda.bintray-release'
3 |
4 | group = 'com.github.CPPAlien'
5 |
6 | android {
7 | compileSdkVersion 27
8 | buildToolsVersion "26.0.2"
9 |
10 | defaultConfig {
11 | minSdkVersion 16
12 | targetSdkVersion 27
13 | versionCode 1
14 | versionName "1.0.0"
15 | }
16 | buildTypes {
17 | release {
18 | minifyEnabled false
19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20 | }
21 | }
22 | lintOptions {
23 | abortOnError false
24 | }
25 | }
26 |
27 | dependencies {
28 | compile fileTree(dir: 'libs', include: ['*.jar'])
29 | compile 'com.android.support:support-v4:27.1.1'
30 | }
31 |
32 | publish {
33 | userOrg = 'pengtao'
34 | groupId = 'me.pengtao'
35 | artifactId = 'ChatKeyboard'
36 | publishVersion = '2.0.0'
37 | desc = 'ChatKeyboard is a powerful and easy using keyboard lib for Android, includes emoticons selection, audio recording, multi media functions, etc.'
38 | website = 'https://github.com/CPPAlien/ChatKeyboard'
39 | }
--------------------------------------------------------------------------------
/keyboard/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\Coding\android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/keyboard/src/androidTest/java/cn/hadcn/keyboard/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/keyboard/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/ChatTextView.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard;
2 |
3 | import android.content.Context;
4 | import android.text.SpannableStringBuilder;
5 | import android.text.TextUtils;
6 | import android.util.AttributeSet;
7 | import android.widget.TextView;
8 |
9 | import cn.hadcn.keyboard.emoticon.util.EmoticonHandler;
10 | import cn.hadcn.keyboard.utils.Utils;
11 |
12 | /**
13 | * ChatTextView
14 | * which replace the special unicode to emoticon
15 | * @author chris
16 | */
17 | public class ChatTextView extends TextView {
18 | private Context mContext;
19 |
20 | public ChatTextView(Context context) {
21 | super(context);
22 | init(context);
23 | }
24 |
25 | public ChatTextView(Context context, AttributeSet attrs) {
26 | super(context, attrs);
27 | init(context);
28 | }
29 |
30 | public ChatTextView(Context context, AttributeSet attrs, int defStyleAttr) {
31 | super(context, attrs, defStyleAttr);
32 | init(context);
33 | }
34 |
35 | private void init(Context context) {
36 | mContext = context;
37 | setText(getText());
38 | }
39 |
40 | @Override
41 | public void setText(CharSequence text, BufferType type) {
42 | if (!TextUtils.isEmpty(text)) {
43 | SpannableStringBuilder builder = new SpannableStringBuilder(text);
44 | EmoticonHandler.getInstance(mContext).setTextFace(text.toString(), builder, 0, Utils
45 | .getFontSize(getTextSize()));
46 | super.setText(builder, type);
47 | } else {
48 | super.setText(text, type);
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/EmoticonEntity.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard;
2 |
3 | import cn.hadcn.keyboard.utils.EmoticonBase;
4 |
5 | /**
6 | * EmoticonEntity
7 | * @author chris
8 | */
9 | public class EmoticonEntity {
10 | private String path;
11 | private EmoticonBase.Scheme scheme;
12 |
13 | public EmoticonEntity(String path, EmoticonBase.Scheme scheme) {
14 | this.path = path;
15 | this.scheme = scheme;
16 | }
17 |
18 | public String getPath() {
19 | return path;
20 | }
21 |
22 | public EmoticonBase.Scheme getScheme() {
23 | return scheme;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/RecordingLayout.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard;
2 |
3 | import android.Manifest;
4 | import android.content.Context;
5 | import android.content.pm.PackageManager;
6 | import android.support.v4.app.ActivityCompat;
7 | import android.util.AttributeSet;
8 | import android.view.LayoutInflater;
9 | import android.widget.ImageView;
10 | import android.widget.LinearLayout;
11 | import android.widget.ProgressBar;
12 | import android.widget.RelativeLayout;
13 | import android.widget.TextView;
14 |
15 | import java.util.ArrayList;
16 | import java.util.List;
17 |
18 | /**
19 | * RecordingLayout
20 | * @author chris
21 | */
22 | public class RecordingLayout extends RelativeLayout {
23 | LinearLayout llRecordingStart;
24 | ImageView ivRecordingCancel;
25 | ImageView ivVoiceLevel;
26 | ProgressBar pbLoading;
27 | TextView tvNotify;
28 | int mCurrentVoiceLevel = 0;
29 | List levelActions = new ArrayList<>();
30 |
31 | public RecordingLayout(Context context) {
32 | super(context);
33 | init(context);
34 | }
35 |
36 | public RecordingLayout(Context context, AttributeSet attrs) {
37 | super(context, attrs);
38 | init(context);
39 | }
40 |
41 | public RecordingLayout(Context context, AttributeSet attrs, int defStyleAttr) {
42 | super(context, attrs, defStyleAttr);
43 | init(context);
44 | }
45 |
46 | private void init(Context context) {
47 | LayoutInflater.from(context).inflate(R.layout.keyboard_recording_layout, this);
48 | llRecordingStart = (LinearLayout) findViewById(R.id.had_recording_start);
49 | ivRecordingCancel = (ImageView) findViewById(R.id.had_recording_cancel);
50 | pbLoading = (ProgressBar) findViewById(R.id.had_recording_loading);
51 | tvNotify = (TextView) findViewById(R.id.had_recording_notify);
52 | ivVoiceLevel = (ImageView) findViewById(R.id.had_recording_level);
53 | }
54 |
55 | public void hide() {
56 | setVisibility(GONE);
57 | }
58 |
59 | /**
60 | * show recording area
61 | *
62 | * @param state 0 for canceling state, other for recording state
63 | */
64 | public void show(int state) {
65 | if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission
66 | .RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) {
67 | return;
68 | }
69 | setVisibility(VISIBLE);
70 | if (state == 0) {
71 | pbLoading.setVisibility(GONE);
72 | llRecordingStart.setVisibility(GONE);
73 | ivRecordingCancel.setVisibility(VISIBLE);
74 | tvNotify.setText(getResources().getString(R.string.recording_cancel));
75 | tvNotify.setBackgroundResource(R.drawable.recording_text_bg);
76 | } else if (state == 1) {
77 | pbLoading.setVisibility(GONE);
78 | llRecordingStart.setVisibility(VISIBLE);
79 | ivRecordingCancel.setVisibility(GONE);
80 | tvNotify.setText(getResources().getString(R.string.recording_cancel_notice));
81 | tvNotify.setBackgroundResource(R.drawable.transparent_bg);
82 | } else {
83 | pbLoading.setVisibility(VISIBLE);
84 | llRecordingStart.setVisibility(GONE);
85 | ivRecordingCancel.setVisibility(GONE);
86 | tvNotify.setText(getResources().getString(R.string.recording_cancel_notice));
87 | tvNotify.setBackgroundResource(R.drawable.transparent_bg);
88 | }
89 | }
90 |
91 | public void setVoiceLevel(int level) {
92 | //if set voice again, cancel actions already in queue
93 | if (level == mCurrentVoiceLevel) {
94 | return;
95 | }
96 | for (Runnable r : levelActions) {
97 | removeCallbacks(r);
98 | }
99 | levelActions.clear();
100 |
101 | if (mCurrentVoiceLevel > level) {
102 | for (int i = mCurrentVoiceLevel; i >= level; --i) {
103 | levelActions.add(new LevelAction(i));
104 | }
105 | } else {
106 | for (int i = mCurrentVoiceLevel; i <= level; ++i) {
107 | levelActions.add(new LevelAction(i));
108 | }
109 | }
110 | for (int i = 0; i < levelActions.size(); ++i) {
111 | postDelayed(levelActions.get(i), 10 * (i + 1));
112 | }
113 | }
114 |
115 | private class LevelAction implements Runnable {
116 | int level;
117 |
118 | public LevelAction(int level) {
119 | this.level = level;
120 | }
121 |
122 | @Override
123 | public void run() {
124 | ivVoiceLevel.setImageResource(chooseLevelDrawable(level));
125 | mCurrentVoiceLevel = level;
126 | }
127 | }
128 |
129 | private int chooseLevelDrawable(int level) {
130 | switch (level) {
131 | case 0:
132 | return R.drawable.recording_level_1;
133 | case 1:
134 | return R.drawable.recording_level_2;
135 | case 2:
136 | return R.drawable.recording_level_3;
137 | case 3:
138 | return R.drawable.recording_level_4;
139 | case 4:
140 | return R.drawable.recording_level_5;
141 | case 5:
142 | return R.drawable.recording_level_6;
143 | default:
144 | return R.drawable.recording_level_7;
145 | }
146 | }
147 | }
148 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/emoticon/EmoticonBean.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.emoticon;
2 |
3 | /**
4 | * @author chris
5 | */
6 | public class EmoticonBean {
7 | public final static int FACE_TYPE_NORMAL = 0;
8 | public final static int FACE_TYPE_DEL = 1;
9 | public final static int FACE_TYPE_STICKER = 2; // user downloaded emoticons
10 | private long eventType;
11 | private String iconUri;
12 | private String msgUri;
13 | private String tag;
14 | private String name;
15 |
16 | public long getEventType() {
17 | return eventType;
18 | }
19 |
20 | public void setEventType(long eventType) {
21 | this.eventType = eventType;
22 | }
23 |
24 | public String getIconUri() {
25 | return iconUri;
26 | }
27 |
28 | public void setIconUri(String iconUri) {
29 | this.iconUri = iconUri;
30 | }
31 |
32 | public String getMsgUri() {
33 | return msgUri;
34 | }
35 |
36 | public void setMsgUri(String msgUri) {
37 | this.msgUri = msgUri;
38 | }
39 |
40 | public String getTag() {
41 | return tag;
42 | }
43 |
44 | public void setTag(String tag) {
45 | this.tag = tag;
46 | }
47 |
48 | public String getName() {
49 | return name;
50 | }
51 |
52 | public void setName(String name) {
53 | this.name = name;
54 | }
55 |
56 | public static String fromChars(String chars) {
57 | return chars;
58 | }
59 |
60 | public static String fromChar(char ch) {
61 | return Character.toString(ch);
62 | }
63 |
64 | public static String fromCodePoint(int codePoint) {
65 | return newString(codePoint);
66 | }
67 |
68 | private static String newString(int codePoint) {
69 | if (Character.charCount(codePoint) == 1) {
70 | return String.valueOf(codePoint);
71 | } else {
72 | return new String(Character.toChars(codePoint));
73 | }
74 | }
75 |
76 | public EmoticonBean(long eventType, String iconUri, String tag, String name) {
77 | this.eventType = eventType;
78 | this.iconUri = iconUri;
79 | this.tag = tag;
80 | this.name = name;
81 | }
82 |
83 | public EmoticonBean() {
84 | // default
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/emoticon/EmoticonSetBean.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.emoticon;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * @author chris
7 | */
8 | public class EmoticonSetBean {
9 | /**
10 | * name of set
11 | */
12 | private String name;
13 | /**
14 | * line number
15 | */
16 | private int line;
17 | /**
18 | * row number
19 | */
20 | private int row;
21 | /**
22 | * icon
23 | */
24 | private String iconUri;
25 | /**
26 | * is show delete button
27 | */
28 | private boolean isShowDelBtn;
29 | /**
30 | * item padding
31 | */
32 | private int itemPadding;
33 | private int horizontalSpacing;
34 | private int verticalSpacing;
35 | private List emoticonList;
36 | private boolean isShownName;
37 |
38 | public EmoticonSetBean() {
39 | }
40 |
41 | public EmoticonSetBean(String name, int line, int row) {
42 | this.name = name;
43 | this.line = line;
44 | this.row = row;
45 | }
46 |
47 | public EmoticonSetBean(String name, int line, int row, String iconUri, boolean isShowDelBtn,
48 | boolean isShownName,
49 | int itemPadding, int horizontalSpacing, int verticalSpacing,
50 | List emoticonList) {
51 | this.name = name;
52 | this.line = line;
53 | this.row = row;
54 | this.iconUri = iconUri;
55 | this.isShowDelBtn = isShowDelBtn;
56 | this.itemPadding = itemPadding;
57 | this.horizontalSpacing = horizontalSpacing;
58 | this.verticalSpacing = verticalSpacing;
59 | this.emoticonList = emoticonList;
60 | this.isShownName = isShownName;
61 | }
62 |
63 | public boolean isShownName() {
64 | return isShownName;
65 | }
66 |
67 | public void setIsShownName(boolean isShownName) {
68 | this.isShownName = isShownName;
69 | }
70 |
71 | public String getName() {
72 | return name;
73 | }
74 |
75 | public void setName(String name) {
76 | this.name = name;
77 | }
78 |
79 | public int getLine() {
80 | return line;
81 | }
82 |
83 | public void setLine(int line) {
84 | this.line = line;
85 | }
86 |
87 | public int getRow() {
88 | return row;
89 | }
90 |
91 | public void setRow(int row) {
92 | this.row = row;
93 | }
94 |
95 | public String getIconUri() {
96 | return iconUri;
97 | }
98 |
99 | public void setIconUri(String iconUri) {
100 | this.iconUri = iconUri;
101 | }
102 |
103 | public boolean isShowDelBtn() {
104 | return isShowDelBtn;
105 | }
106 |
107 | public void setShowDelBtn(boolean isShowDelBtn) {
108 | this.isShowDelBtn = isShowDelBtn;
109 | }
110 |
111 | public int getItemPadding() {
112 | return itemPadding;
113 | }
114 |
115 | public void setItemPadding(int itemPadding) {
116 | this.itemPadding = itemPadding;
117 | }
118 |
119 | public int getHorizontalSpacing() {
120 | return horizontalSpacing;
121 | }
122 |
123 | public void setHorizontalSpacing(int horizontalSpacing) {
124 | this.horizontalSpacing = horizontalSpacing;
125 | }
126 |
127 | public int getVerticalSpacing() {
128 | return verticalSpacing;
129 | }
130 |
131 | public void setVerticalSpacing(int verticalSpacing) {
132 | this.verticalSpacing = verticalSpacing;
133 | }
134 |
135 | public List getEmoticonList() {
136 | return emoticonList;
137 | }
138 |
139 | public void setEmoticonList(List emoticonList) {
140 | this.emoticonList = emoticonList;
141 | }
142 | }
143 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/emoticon/db/TableColumns.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.emoticon.db;
2 |
3 | import android.provider.BaseColumns;
4 |
5 | /**
6 | * @author chris
7 | */
8 | final class TableColumns {
9 | /**
10 | * the columns definition for emoticon item
11 | */
12 | class EmoticonItem implements BaseColumns {
13 | private EmoticonItem() {
14 | }
15 | //1, for send in input area; 2, for sent in chat area directly
16 | static final String EVENT_TYPE = "event_type";
17 | static final String TAG = "tag"; //for matching, should be unique
18 | static final String NAME = "name"; //for displaying
19 | static final String ICON_URI = "icon_uri"; //uri for displaying in grid
20 | static final String MSG_URI = "msg_uri"; //for being sent in chat
21 | static final String EMOTICON_SET_NAME = "emoticon_set_name"; //emoticon set name
22 | }
23 |
24 | /**
25 | * the columns definition for emoticons set
26 | */
27 | class EmoticonSet implements BaseColumns {
28 | private EmoticonSet() {
29 | }
30 |
31 | static final String NAME = "name";
32 | static final String LINE = "line";
33 | static final String ROW = "row";
34 | static final String ICON_URI = "icon_uri";
35 | static final String IS_SHOW_DEL_BTN = "is_show_del_btn";
36 | static final String ITEM_PADDING = "item_padding";
37 | static final String HORIZONTAL_SPACING = "horizontal_spacing";
38 | static final String VERTICAL_SPACING = "vertical_spacing";
39 | static final String IS_SHOW_NAME = "is_show_name";
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/emoticon/util/DefEmoticons.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.emoticon.util;
2 |
3 | import cn.hadcn.keyboard.emoticon.EmoticonBean;
4 |
5 | /**
6 | * @author chris
7 | */
8 | public class DefEmoticons {
9 | private DefEmoticons() {
10 | }
11 |
12 | /**
13 | * emoji
14 | */
15 | public static final String[] emojiArray = {
16 | "emoji_0x1f604.png," + EmoticonBean.fromCodePoint(0x1f604),
17 | "emoji_0x1f603.png," + EmoticonBean.fromCodePoint(0x1f603),
18 | "emoji_0x1f60a.png," + EmoticonBean.fromCodePoint(0x1f60a),
19 | "emoji_0x1f609.png," + EmoticonBean.fromCodePoint(0x1f609),
20 | "emoji_0x1f60d.png," + EmoticonBean.fromCodePoint(0x1f60d),
21 | "emoji_0x1f618.png," + EmoticonBean.fromCodePoint(0x1f618),
22 | "emoji_0x1f61a.png," + EmoticonBean.fromCodePoint(0x1f61a),
23 | "emoji_0x1f61c.png," + EmoticonBean.fromCodePoint(0x1f61c),
24 | "emoji_0x1f61d.png," + EmoticonBean.fromCodePoint(0x1f61d),
25 | "emoji_0x1f633.png," + EmoticonBean.fromCodePoint(0x1f633),
26 | "emoji_0x1f601.png," + EmoticonBean.fromCodePoint(0x1f601),
27 | "emoji_0x1f614.png," + EmoticonBean.fromCodePoint(0x1f614),
28 | "emoji_0x1f60c.png," + EmoticonBean.fromCodePoint(0x1f60c),
29 | "emoji_0x1f612.png," + EmoticonBean.fromCodePoint(0x1f612),
30 | "emoji_0x1f61e.png," + EmoticonBean.fromCodePoint(0x1f61e),
31 | "emoji_0x1f623.png," + EmoticonBean.fromCodePoint(0x1f623),
32 | "emoji_0x1f622.png," + EmoticonBean.fromCodePoint(0x1f622),
33 | "emoji_0x1f602.png," + EmoticonBean.fromCodePoint(0x1f602),
34 | "emoji_0x1f62d.png," + EmoticonBean.fromCodePoint(0x1f62d),
35 | "emoji_0x1f62a.png," + EmoticonBean.fromCodePoint(0x1f62a),
36 | "emoji_0x1f625.png," + EmoticonBean.fromCodePoint(0x1f625),
37 | "emoji_0x1f630.png," + EmoticonBean.fromCodePoint(0x1f630),
38 | "emoji_0x1f613.png," + EmoticonBean.fromCodePoint(0x1f613),
39 | "emoji_0x1f628.png," + EmoticonBean.fromCodePoint(0x1f628),
40 | "emoji_0x1f631.png," + EmoticonBean.fromCodePoint(0x1f631),
41 | "emoji_0x1f620.png," + EmoticonBean.fromCodePoint(0x1f620),
42 | "emoji_0x1f621.png," + EmoticonBean.fromCodePoint(0x1f621),
43 | "emoji_0x1f616.png," + EmoticonBean.fromCodePoint(0x1f616),
44 | "emoji_0x1f637.png," + EmoticonBean.fromCodePoint(0x1f637),
45 | "emoji_0x1f632.png," + EmoticonBean.fromCodePoint(0x1f632),
46 | "emoji_0x1f47f.png," + EmoticonBean.fromCodePoint(0x1f47f),
47 | "emoji_0x1f60f.png," + EmoticonBean.fromCodePoint(0x1f60f),
48 | "emoji_0x1f466.png," + EmoticonBean.fromCodePoint(0x1f466),
49 | "emoji_0x1f467.png," + EmoticonBean.fromCodePoint(0x1f467),
50 | "emoji_0x1f468.png," + EmoticonBean.fromCodePoint(0x1f468),
51 | "emoji_0x1f469.png," + EmoticonBean.fromCodePoint(0x1f469),
52 | "emoji_0x1f31f.png," + EmoticonBean.fromCodePoint(0x1f31f),
53 | "emoji_0x1f444.png," + EmoticonBean.fromCodePoint(0x1f444),
54 | "emoji_0x1f44d.png," + EmoticonBean.fromCodePoint(0x1f44d),
55 | "emoji_0x1f44e.png," + EmoticonBean.fromCodePoint(0x1f44e),
56 | "emoji_0x1f44c.png," + EmoticonBean.fromCodePoint(0x1f44c),
57 | "emoji_0x1f44a.png," + EmoticonBean.fromCodePoint(0x1f44a),
58 | "emoji_0x270a.png," + EmoticonBean.fromChar((char) 0x270a),
59 | "emoji_0x270c.png," + EmoticonBean.fromChar((char) 0x270c),
60 | "emoji_0x1f446.png," + EmoticonBean.fromCodePoint(0x1f446),
61 | "emoji_0x1f447.png," + EmoticonBean.fromCodePoint(0x1f447),
62 | "emoji_0x1f449.png," + EmoticonBean.fromCodePoint(0x1f449),
63 | "emoji_0x1f448.png," + EmoticonBean.fromCodePoint(0x1f448),
64 | "emoji_0x1f64f.png," + EmoticonBean.fromCodePoint(0x1f64f),
65 | "emoji_0x1f44f.png," + EmoticonBean.fromCodePoint(0x1f44f),
66 | "emoji_0x1f4aa.png," + EmoticonBean.fromCodePoint(0x1f4aa),
67 | "emoji_0x1f457.png," + EmoticonBean.fromCodePoint(0x1f457),
68 | "emoji_0x1f380.png," + EmoticonBean.fromCodePoint(0x1f380),
69 | "emoji_0x2764.png," + EmoticonBean.fromChar((char) 0x2764),
70 | "emoji_0x1f494.png," + EmoticonBean.fromCodePoint(0x1f494),
71 | "emoji_0x1f48e.png," + EmoticonBean.fromCodePoint(0x1f48e),
72 | "emoji_0x1f436.png," + EmoticonBean.fromCodePoint(0x1f436),
73 | "emoji_0x1f431.png," + EmoticonBean.fromCodePoint(0x1f431),
74 | "emoji_0x1f339.png," + EmoticonBean.fromCodePoint(0x1f339),
75 | "emoji_0x1f33b.png," + EmoticonBean.fromCodePoint(0x1f33b),
76 | "emoji_0x1f341.png," + EmoticonBean.fromCodePoint(0x1f341),
77 | "emoji_0x1f343.png," + EmoticonBean.fromCodePoint(0x1f343),
78 | "emoji_0x1f319.png," + EmoticonBean.fromCodePoint(0x1f319),
79 | "emoji_0x2600.png," + EmoticonBean.fromChar((char) 0x2600),
80 | "emoji_0x2601.png," + EmoticonBean.fromChar((char) 0x2601),
81 | "emoji_0x26a1.png," + EmoticonBean.fromChar((char) 0x26a1),
82 | "emoji_0x2614.png," + EmoticonBean.fromChar((char) 0x2614),
83 | "emoji_0x1f47b.png," + EmoticonBean.fromCodePoint(0x1f47b),
84 | "emoji_0x1f385.png," + EmoticonBean.fromCodePoint(0x1f385),
85 | "emoji_0x1f381.png," + EmoticonBean.fromCodePoint(0x1f381),
86 | "emoji_0x1f4f1.png," + EmoticonBean.fromCodePoint(0x1f4f1),
87 | "emoji_0x1f50d.png," + EmoticonBean.fromCodePoint(0x1f50d),
88 | "emoji_0x1f4a3.png," + EmoticonBean.fromCodePoint(0x1f4a3),
89 | "emoji_0x26bd.png," + EmoticonBean.fromChar((char) 0x26bd),
90 | "emoji_0x2615.png," + EmoticonBean.fromChar((char) 0x2615),
91 | "emoji_0x1f37a.png," + EmoticonBean.fromCodePoint(0x1f37a),
92 | "emoji_0x1f382.png," + EmoticonBean.fromCodePoint(0x1f382),
93 | "emoji_0x1f3e0.png," + EmoticonBean.fromCodePoint(0x1f3e0),
94 | "emoji_0x1f697.png," + EmoticonBean.fromCodePoint(0x1f697),
95 | "emoji_0x1f559.png," + EmoticonBean.fromCodePoint(0x1f559),
96 | };
97 | }
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/emoticon/util/EmoticonHandler.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.emoticon.util;
2 |
3 | import android.content.Context;
4 | import android.graphics.drawable.Drawable;
5 | import android.support.annotation.NonNull;
6 | import android.text.Spannable;
7 |
8 | import java.util.ArrayList;
9 | import java.util.List;
10 |
11 | import cn.hadcn.keyboard.emoticon.EmoticonBean;
12 | import cn.hadcn.keyboard.emoticon.db.EmoticonDBHelper;
13 | import cn.hadcn.keyboard.utils.EmoticonLoader;
14 | import cn.hadcn.keyboard.view.VerticalImageSpan;
15 |
16 | /**
17 | * @author chris
18 | */
19 | public class EmoticonHandler {
20 | private List mEmoticonBeans = new ArrayList<>();
21 | private static EmoticonHandler sEmoticonHandler = null;
22 | private Context mContext;
23 | private EmoticonDBHelper emoticonDbHelper = null;
24 |
25 | public static EmoticonHandler getInstance(@NonNull Context context) {
26 | if (sEmoticonHandler == null) {
27 | sEmoticonHandler = new EmoticonHandler(context.getApplicationContext());
28 | }
29 | return sEmoticonHandler;
30 | }
31 |
32 | private EmoticonHandler(Context context) {
33 | mContext = context;
34 | emoticonDbHelper = new EmoticonDBHelper(context);
35 | }
36 |
37 | public EmoticonDBHelper getEmoticonDbHelper() {
38 | if (emoticonDbHelper == null) {
39 | emoticonDbHelper = new EmoticonDBHelper(mContext);
40 | }
41 | return emoticonDbHelper;
42 | }
43 |
44 | public List loadEmoticonsToMemory() {
45 | mEmoticonBeans = emoticonDbHelper.queryAllEmoticonBeans();
46 | emoticonDbHelper.cleanup();
47 |
48 | return mEmoticonBeans;
49 | }
50 |
51 | public String getEmoticonUriByTag(String tag) {
52 | return emoticonDbHelper.getUriByTag(tag);
53 | }
54 |
55 | public void setTextFace(String content, Spannable spannable, int start, int size) {
56 | if (mEmoticonBeans == null) {
57 | mEmoticonBeans = emoticonDbHelper.queryAllEmoticonBeans();
58 | emoticonDbHelper.cleanup();
59 | }
60 | if (content.length() <= 0) {
61 | return;
62 | }
63 | int keyIndex = start;
64 | for (EmoticonBean bean : mEmoticonBeans) {
65 | String key = bean.getTag();
66 | int keyLength = key.length();
67 | while (keyIndex >= 0) {
68 | keyIndex = content.indexOf(key, keyIndex); //when do not find, get -1
69 | if (keyIndex < 0) {
70 | break;
71 | }
72 | Drawable drawable = EmoticonLoader.getInstance(mContext).getDrawable(bean
73 | .getIconUri());
74 | drawable.setBounds(0, 0, size, size);
75 | VerticalImageSpan imageSpan = new VerticalImageSpan(drawable);
76 | spannable.setSpan(imageSpan, keyIndex, keyIndex + keyLength, Spannable
77 | .SPAN_EXCLUSIVE_EXCLUSIVE);
78 | keyIndex += keyLength;
79 | }
80 | keyIndex = start;
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/emoticon/util/EmoticonsKeyboardBuilder.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.emoticon.util;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import cn.hadcn.keyboard.emoticon.EmoticonSetBean;
7 |
8 | /**
9 | * @author chris
10 | */
11 | public class EmoticonsKeyboardBuilder {
12 | public Builder builder;
13 |
14 | private EmoticonsKeyboardBuilder(Builder builder) {
15 | this.builder = builder;
16 | }
17 |
18 | public static class Builder {
19 | List mEmoticonSetBeanList = new ArrayList<>();
20 |
21 | public List getEmoticonSetBeanList() {
22 | return mEmoticonSetBeanList;
23 | }
24 |
25 | public Builder setEmoticonSetBeanList(List mEmoticonSetBeanList) {
26 | this.mEmoticonSetBeanList = mEmoticonSetBeanList;
27 | return this;
28 | }
29 |
30 | public EmoticonsKeyboardBuilder build() {
31 | return new EmoticonsKeyboardBuilder(this);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/emoticon/view/EmoticonLayout.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.emoticon.view;
2 |
3 | import android.content.Context;
4 | import android.graphics.drawable.Drawable;
5 | import android.support.annotation.NonNull;
6 | import android.util.AttributeSet;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.widget.RelativeLayout;
10 |
11 | import cn.hadcn.keyboard.R;
12 | import cn.hadcn.keyboard.emoticon.EmoticonBean;
13 | import cn.hadcn.keyboard.emoticon.util.EmoticonsKeyboardBuilder;
14 | import cn.hadcn.keyboard.view.IndicatorView;
15 |
16 | /**
17 | * @author chris
18 | */
19 | public class EmoticonLayout extends RelativeLayout implements EmoticonsPageView
20 | .OnEmoticonsPageViewListener {
21 | private Context mContext;
22 | private EmoticonsPageView epvContent;
23 | private IndicatorView ivIndicator;
24 | private EmoticonsTabBarView etvToolBar;
25 |
26 | public EmoticonLayout(Context context) {
27 | super(context);
28 | mContext = context;
29 | init(mContext);
30 | }
31 |
32 | public EmoticonLayout(Context context, AttributeSet attrs) {
33 | super(context, attrs);
34 | mContext = context;
35 | init(mContext);
36 | }
37 |
38 | public EmoticonLayout(Context context, AttributeSet attrs, int defStyleAttr) {
39 | super(context, attrs, defStyleAttr);
40 | mContext = context;
41 | init(mContext);
42 | }
43 |
44 | private void init(Context context) {
45 | LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context
46 | .LAYOUT_INFLATER_SERVICE);
47 | inflater.inflate(R.layout.keyboard_emoticon_layout, this);
48 | ivIndicator = (IndicatorView) findViewById(R.id.emoticon_indicator_view);
49 | epvContent = (EmoticonsPageView) findViewById(R.id.emoticon_page_view);
50 | etvToolBar = (EmoticonsTabBarView) findViewById(R.id.emoticon_page_toolbar);
51 | epvContent.setOnIndicatorListener(this);
52 | epvContent.setIViewListener(new EmoticonsAdapter.EmoticonsListener() {
53 | @Override
54 | public void onItemClick(EmoticonBean bean) {
55 | mListener.onEmoticonItemClicked(bean);
56 | }
57 |
58 | @Override
59 | public void onPageChangeTo(int position) {
60 | etvToolBar.setToolBtnSelect(position);
61 | }
62 | });
63 | etvToolBar.setTabChangeListener(new EmoticonsTabBarView
64 | .OnEmoticonsTabChangeListener() {
65 | @Override
66 | public void onTabClicked(final int position) {
67 | epvContent.setPageSelect(position);
68 | }
69 | });
70 | }
71 |
72 | OnEmoticonListener mListener = null;
73 |
74 | public interface OnEmoticonListener {
75 | void onEmoticonItemClicked(EmoticonBean bean);
76 | }
77 |
78 | @Override
79 | public void emoticonsPageViewCountChanged(int count) {
80 | ivIndicator.setIndicatorCount(count);
81 | }
82 |
83 | @Override
84 | public void moveTo(int position) {
85 | ivIndicator.moveTo(position);
86 | }
87 |
88 | @Override
89 | public void moveBy(int oldPosition, int newPosition) {
90 | ivIndicator.moveTo(newPosition);
91 | }
92 |
93 | public void addTabBarItem(@NonNull Drawable icon) {
94 | if (etvToolBar != null) {
95 | etvToolBar.addItem(icon);
96 | }
97 | }
98 |
99 | public void addFixedView(View view, boolean isRight) {
100 | if (etvToolBar != null) {
101 | etvToolBar.addFixedView(view, isRight);
102 | }
103 | }
104 |
105 | public void setContents(EmoticonsKeyboardBuilder builder, OnEmoticonListener listener) {
106 | epvContent.setEmoticonContents(builder);
107 | etvToolBar.setEmoticonContents(builder);
108 | mListener = listener;
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/emoticon/view/EmoticonsAdapter.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.emoticon.view;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.AbsListView;
8 | import android.widget.BaseAdapter;
9 | import android.widget.ImageView;
10 | import android.widget.LinearLayout;
11 | import android.widget.RelativeLayout;
12 | import android.widget.TextView;
13 |
14 | import java.util.List;
15 |
16 | import cn.hadcn.keyboard.R;
17 | import cn.hadcn.keyboard.emoticon.EmoticonBean;
18 | import cn.hadcn.keyboard.utils.EmoticonLoader;
19 |
20 | /**
21 | * @author chris
22 | */
23 | public class EmoticonsAdapter extends BaseAdapter {
24 | private Context mContext;
25 | private List data;
26 | private int mItemHeight = 0;
27 | private int mImgHeight = 0;
28 | private boolean isDisplayName = false;
29 |
30 | public EmoticonsAdapter(Context context, List list, boolean isDisplayName) {
31 | this.mContext = context;
32 | this.data = list;
33 | this.isDisplayName = isDisplayName;
34 | }
35 |
36 | @Override
37 | public int getCount() {
38 | return data.size();
39 | }
40 |
41 | @Override
42 | public EmoticonBean getItem(int position) {
43 | return data.get(position);
44 | }
45 |
46 | @Override
47 | public long getItemId(int position) {
48 | return position;
49 | }
50 |
51 | @Override
52 | public View getView(int position, View convertView, ViewGroup parent) {
53 | ViewHolder viewHolder;
54 | if (convertView == null) {
55 | convertView = LayoutInflater.from(mContext).inflate(R.layout.keyboard_emoticon_item, parent,
56 | false);
57 | convertView.setLayoutParams(new AbsListView.LayoutParams(RelativeLayout.LayoutParams
58 | .MATCH_PARENT, mItemHeight));
59 |
60 | viewHolder = new ViewHolder(convertView);
61 | LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(mImgHeight,
62 | mImgHeight);
63 | viewHolder.ivEmoticon.setLayoutParams(params);
64 | convertView.setTag(viewHolder);
65 | } else {
66 | viewHolder = (ViewHolder) convertView.getTag();
67 | }
68 |
69 | final EmoticonBean emoticonBean = getItem(position);
70 | if (emoticonBean != null) { // exists some empty block
71 | viewHolder.ivEmoticon.setBackgroundResource(R.drawable.emoticon_bg);
72 | if (isDisplayName) {
73 | viewHolder.tvName.setVisibility(View.VISIBLE);
74 | viewHolder.tvName.setText(getItem(position).getName());
75 | } else {
76 | viewHolder.tvName.setVisibility(View.GONE);
77 | }
78 | viewHolder.ivEmoticon.setImageDrawable(EmoticonLoader.getInstance(mContext)
79 | .getDrawable(emoticonBean.getIconUri()));
80 |
81 | convertView.setOnClickListener(new View.OnClickListener() {
82 | @Override
83 | public void onClick(View v) {
84 | if (mOnItemListener != null) {
85 | mOnItemListener.onItemClick(emoticonBean);
86 | }
87 | }
88 | });
89 | }
90 |
91 | return convertView;
92 | }
93 |
94 | static class ViewHolder {
95 | public ImageView ivEmoticon;
96 | public TextView tvName;
97 |
98 | public ViewHolder(View view) {
99 | ivEmoticon = (ImageView) view.findViewById(R.id.emoticon_item_image);
100 | tvName = (TextView) view.findViewById(R.id.emoticon_item_text);
101 | }
102 | }
103 |
104 | public void setHeight(int height, int padding) {
105 | mItemHeight = height;
106 | mImgHeight = mItemHeight - padding;
107 | notifyDataSetChanged();
108 | }
109 |
110 | private EmoticonsListener mOnItemListener;
111 |
112 | void setOnItemListener(EmoticonsListener listener) {
113 | this.mOnItemListener = listener;
114 | }
115 |
116 | public interface EmoticonsListener {
117 | void onItemClick(EmoticonBean bean);
118 |
119 | void onPageChangeTo(int position);
120 | }
121 | }
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/media/MediaBean.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.media;
2 |
3 | /**
4 | * @author chris
5 | */
6 | public class MediaBean {
7 | private int id;
8 | private int drawableId;
9 | private String text;
10 | private MediaListener mediaListener;
11 |
12 | public interface MediaListener {
13 | void onMediaClick(int id);
14 | }
15 |
16 | public MediaBean(int id, int drawableId, String text, MediaListener mediaListener) {
17 | this.id = id;
18 | this.drawableId = drawableId;
19 | this.text = text;
20 | this.mediaListener = mediaListener;
21 | }
22 |
23 | public int getId() {
24 | return id;
25 | }
26 |
27 | public int getDrawableId() {
28 | return drawableId;
29 | }
30 |
31 | public String getText() {
32 | return text;
33 | }
34 |
35 | public MediaListener getMediaListener() {
36 | return mediaListener;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/media/MediaGridAdapter.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.media;
2 |
3 | import android.content.Context;
4 | import android.support.v4.content.ContextCompat;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.View.OnClickListener;
8 | import android.view.ViewGroup;
9 | import android.widget.BaseAdapter;
10 | import android.widget.ImageView;
11 | import android.widget.LinearLayout;
12 | import android.widget.TextView;
13 |
14 | import java.util.List;
15 |
16 | import cn.hadcn.keyboard.R;
17 |
18 | /**
19 | * @author chris
20 | */
21 | public class MediaGridAdapter extends BaseAdapter {
22 | private List mediaModels;
23 | private Context mContext;
24 | private int mSize = 0;
25 |
26 | public MediaGridAdapter(Context context, List mediaModels, int size) {
27 | this.mContext = context;
28 | this.mediaModels = mediaModels;
29 | mSize = size;
30 | }
31 |
32 | public void resizeItem(int size) {
33 | mSize = size;
34 | }
35 |
36 | @Override
37 | public View getView(final int position, View convertView, ViewGroup parent) {
38 | ViewHolder viewHolder;
39 | if (convertView == null) {
40 | LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context
41 | .LAYOUT_INFLATER_SERVICE);
42 | convertView = inflater.inflate(R.layout.keyboard_media_item, parent, false);
43 | viewHolder = new ViewHolder(convertView);
44 | viewHolder.ivImage.setLayoutParams(new LinearLayout.LayoutParams(mSize, mSize));
45 | convertView.setTag(viewHolder);
46 | } else {
47 | viewHolder = (ViewHolder) convertView.getTag();
48 | }
49 |
50 | viewHolder.ivImage.setImageDrawable(ContextCompat.getDrawable(mContext, getItem(position)
51 | .getDrawableId()));
52 |
53 | viewHolder.tvText.setText(getItem(position).getText());
54 |
55 | convertView.setOnClickListener(new OnClickListener() {
56 | @Override
57 | public void onClick(View v) {
58 | getItem(position).getMediaListener().onMediaClick(getItem(position).getId());
59 | }
60 | });
61 |
62 | return convertView;
63 | }
64 |
65 | static class ViewHolder {
66 | public ImageView ivImage;
67 | public TextView tvText;
68 |
69 | public ViewHolder(View view) {
70 | ivImage = (ImageView) view.findViewById(R.id.media_item_image);
71 | tvText = (TextView) view.findViewById(R.id.media_item_text);
72 | }
73 | }
74 |
75 | @Override
76 | public int getCount() {
77 | return mediaModels.size();
78 | }
79 |
80 | @Override
81 | public MediaBean getItem(int position) {
82 | return mediaModels.get(position);
83 | }
84 |
85 | @Override
86 | public long getItemId(int position) {
87 | return position;
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/media/MediaLayout.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.media;
2 |
3 | import android.content.Context;
4 | import android.support.v4.view.ViewPager;
5 | import android.util.AttributeSet;
6 | import android.view.LayoutInflater;
7 | import android.widget.RelativeLayout;
8 |
9 | import java.util.List;
10 |
11 | import cn.hadcn.keyboard.R;
12 | import cn.hadcn.keyboard.view.IndicatorView;
13 |
14 | /**
15 | * @author chris
16 | */
17 | public class MediaLayout extends RelativeLayout implements ViewPager.OnPageChangeListener {
18 | private ViewPager vpContent;
19 | private IndicatorView ivIndicator;
20 | private Context mContext;
21 |
22 | public MediaLayout(Context context) {
23 | super(context);
24 | mContext = context;
25 | init(context);
26 | }
27 |
28 | public MediaLayout(Context context, AttributeSet attrs) {
29 | super(context, attrs);
30 | mContext = context;
31 | init(context);
32 | }
33 |
34 | public MediaLayout(Context context, AttributeSet attrs, int defStyleAttr) {
35 | super(context, attrs, defStyleAttr);
36 | mContext = context;
37 | init(context);
38 | }
39 |
40 | private void init(Context context) {
41 | LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context
42 | .LAYOUT_INFLATER_SERVICE);
43 | inflater.inflate(R.layout.keyboard_media_layout, this);
44 | vpContent = (ViewPager) findViewById(R.id.popup_media_pager);
45 | ivIndicator = (IndicatorView) findViewById(R.id.popup_media_indicator);
46 | vpContent.setOnPageChangeListener(this); //compatible for android 22
47 | }
48 |
49 | public void setContents(List mediaContents) {
50 | int size = getResources().getDimensionPixelSize(R.dimen.keyboard_media_item_size);
51 | MediaPagerAdapter adapter = new MediaPagerAdapter(mContext, mediaContents, size);
52 | vpContent.setAdapter(adapter);
53 | ivIndicator.setIndicatorCount(adapter.getPageNum());
54 | }
55 |
56 | @Override
57 | public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
58 |
59 | }
60 |
61 | @Override
62 | public void onPageSelected(int position) {
63 | ivIndicator.moveTo(position);
64 | }
65 |
66 | @Override
67 | public void onPageScrollStateChanged(int state) {
68 |
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/media/MediaPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.media;
2 |
3 | import android.content.Context;
4 | import android.support.v4.view.PagerAdapter;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.GridView;
9 |
10 | import java.util.ArrayList;
11 | import java.util.List;
12 |
13 | import cn.hadcn.keyboard.R;
14 |
15 |
16 | /**
17 | * @author chris
18 | */
19 | public class MediaPagerAdapter extends PagerAdapter {
20 | private static final int MAX_NUM_PER_PAGE = 8;
21 | private Context mContext;
22 | private List gridAdapterList = new ArrayList<>();
23 | private int mPageNum = 0;
24 | private int mColumnWidth = 0;
25 |
26 | public MediaPagerAdapter(Context context, List mediaModels, int columnWidth) {
27 | mContext = context;
28 | mColumnWidth = columnWidth;
29 | mPageNum = (int) Math.ceil((float) mediaModels.size() / MAX_NUM_PER_PAGE);
30 | for (int i = 0; i < mPageNum; ++i) {
31 | ArrayList mediaItems = new ArrayList<>();
32 | for (int j = i * MAX_NUM_PER_PAGE; j < (i+1) * MAX_NUM_PER_PAGE && j < mediaModels.size(); ++j) {
33 | mediaItems.add(mediaModels.get(j));
34 | }
35 | MediaGridAdapter adapter = new MediaGridAdapter( mContext, mediaItems, mColumnWidth );
36 | gridAdapterList.add(adapter);
37 | }
38 | }
39 |
40 | public int getPageNum() {
41 | return mPageNum;
42 | }
43 |
44 | @Override
45 | public int getCount() {
46 | return gridAdapterList.size();
47 | }
48 |
49 | @Override
50 | public Object instantiateItem(ViewGroup container, int position) {
51 | LayoutInflater inflater = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
52 | View layout = inflater.inflate(R.layout.keyboard_media_page, container, false);
53 |
54 | GridView grid = (GridView) layout.findViewById(R.id.media_grid);
55 | grid.setColumnWidth(mColumnWidth);
56 | grid.setAdapter(gridAdapterList.get(position));
57 |
58 | container.addView(layout);
59 |
60 | return layout;
61 | }
62 |
63 | @Override
64 | public void notifyDataSetChanged() {
65 | super.notifyDataSetChanged();
66 | for (MediaGridAdapter adapter : gridAdapterList) {
67 | adapter.notifyDataSetChanged();
68 | }
69 | }
70 |
71 | @Override
72 | public void destroyItem(ViewGroup container, int position, Object object) {
73 | container.removeAllViews();
74 | }
75 |
76 | @Override
77 | public boolean isViewFromObject(View view, Object object) {
78 | return view == object;
79 | }
80 | }
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/utils/EmoticonBase.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.utils;
2 |
3 | import java.util.Locale;
4 |
5 | /**
6 | * @author chris
7 | */
8 | public interface EmoticonBase {
9 | enum Scheme {
10 | HTTP("http"),
11 | HTTPS("https"),
12 | FILE("file"),
13 | CONTENT("content"),
14 | ASSETS("assets"),
15 | DRAWABLE("drawable"),
16 | UNKNOWN("");
17 | private String scheme;
18 | private String uriPrefix;
19 |
20 | Scheme(String scheme) {
21 | this.scheme = scheme;
22 | uriPrefix = scheme + "://";
23 | }
24 |
25 | public static Scheme ofUri(String uri) {
26 | if (uri != null) {
27 | for (Scheme s : values()) {
28 | if (s.belongsTo(uri)) {
29 | return s;
30 | }
31 | }
32 | }
33 | return UNKNOWN;
34 | }
35 |
36 | public String crop(String uri) {
37 | if (!belongsTo(uri)) {
38 | throw new IllegalArgumentException(String.format("URI [%1$s] doesn't have " +
39 | "expected scheme [%2$s]", uri, scheme));
40 | }
41 | return uri.substring(uriPrefix.length());
42 | }
43 |
44 | public String toUri(String path) {
45 | return uriPrefix + path;
46 | }
47 |
48 | private boolean belongsTo(String uri) {
49 | return uri.toLowerCase(Locale.US).startsWith(uriPrefix);
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/utils/EmoticonLoader.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.utils;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.BitmapFactory;
6 | import android.graphics.drawable.BitmapDrawable;
7 | import android.graphics.drawable.Drawable;
8 |
9 | import java.io.File;
10 | import java.io.FileInputStream;
11 | import java.io.IOException;
12 | import java.io.InputStream;
13 |
14 | import cn.hadcn.keyboard.emoticon.util.EmoticonHandler;
15 |
16 | /**
17 | * @author chris
18 | */
19 | public class EmoticonLoader implements EmoticonBase {
20 | protected final Context mContext;
21 | private volatile static EmoticonLoader instance;
22 | private final static String emoticonConfigFileName = "config.xml";
23 |
24 | public static EmoticonLoader getInstance(Context context) {
25 | if (instance == null) {
26 | synchronized (EmoticonLoader.class) {
27 | if (instance == null) {
28 | instance = new EmoticonLoader(context.getApplicationContext());
29 | }
30 | }
31 | }
32 | return instance;
33 | }
34 |
35 | public EmoticonLoader(Context context) {
36 | this.mContext = context.getApplicationContext();
37 | }
38 |
39 | /**
40 | * get the config file stream in emoticon directory, name of config
41 | * is config.xml
42 | *
43 | * @param path path of directory
44 | * @param scheme scheme
45 | * @return file input stream
46 | */
47 | public InputStream getConfigStream(String path, Scheme scheme) {
48 | switch (scheme) {
49 | case FILE:
50 | try {
51 | File file = new File(path + "/" + emoticonConfigFileName);
52 | if (file.exists()) {
53 | return new FileInputStream(file);
54 | }
55 | } catch (IOException e) {
56 | e.printStackTrace();
57 | }
58 | return null;
59 | case ASSETS:
60 | try {
61 | return mContext.getAssets().open(path + "/" + emoticonConfigFileName);
62 | } catch (Exception e) {
63 | e.printStackTrace();
64 | return null;
65 | }
66 | }
67 | return null;
68 | }
69 |
70 | /**
71 | * get input stream of emoticon
72 | *
73 | * @param imageUri emoticon uri
74 | * @return input stream
75 | */
76 | private InputStream getInputStream(String imageUri) {
77 | switch (Scheme.ofUri(imageUri)) {
78 | case FILE:
79 | String filePath = Scheme.FILE.crop(imageUri);
80 | try {
81 | File file = new File(filePath);
82 | if (file.exists()) {
83 | return new FileInputStream(file);
84 | }
85 | } catch (IOException e) {
86 | e.printStackTrace();
87 | }
88 | return null;
89 | case ASSETS:
90 | String assetsPath = Scheme.ASSETS.crop(imageUri);
91 | try {
92 | return mContext.getAssets().open(assetsPath);
93 | } catch (Exception e) {
94 | e.printStackTrace();
95 | return null;
96 | }
97 | }
98 | return null;
99 | }
100 |
101 | public InputStream getInputStreamByTag(String tag) {
102 | String uri = EmoticonHandler.getInstance(mContext).getEmoticonUriByTag(tag);
103 | return getInputStream(uri);
104 | }
105 |
106 | public Drawable getDrawableByTag(String tag) {
107 | String uri = EmoticonHandler.getInstance(mContext).getEmoticonUriByTag(tag);
108 | return getDrawable(uri);
109 | }
110 |
111 | public Drawable getDrawable(String imageUri) {
112 | switch (Scheme.ofUri(imageUri)) {
113 | case FILE:
114 | String filePath = Scheme.FILE.crop(imageUri);
115 | Bitmap fileBitmap;
116 | try {
117 | fileBitmap = BitmapFactory.decodeFile(filePath);
118 | return new BitmapDrawable(mContext.getResources(), fileBitmap);
119 | } catch (Exception e) {
120 | e.printStackTrace();
121 | }
122 | return null;
123 | case CONTENT:
124 | return null;
125 | case ASSETS:
126 | String assetsPath = Scheme.ASSETS.crop(imageUri);
127 | Bitmap assetsBitmap;
128 | try {
129 | assetsBitmap = BitmapFactory.decodeStream(mContext.getAssets().open
130 | (assetsPath));
131 | return new BitmapDrawable(mContext.getResources(), assetsBitmap);
132 | } catch (IOException e) {
133 | e.printStackTrace();
134 | }
135 | return null;
136 | case DRAWABLE:
137 | String drawableIdString = Scheme.DRAWABLE.crop(imageUri);
138 | int resID = mContext.getResources().getIdentifier(drawableIdString, "drawable",
139 | mContext.getPackageName());
140 | return mContext.getResources().getDrawable((int) resID);
141 | case UNKNOWN:
142 | default:
143 | return null;
144 | }
145 | }
146 | }
147 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/utils/HadLog.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.utils;
2 |
3 | import android.util.Log;
4 |
5 | /**
6 | * @author chris
7 | */
8 | public class HadLog {
9 | public static String LOG_TAG = "HadKeyboard";
10 | public static boolean enableLog = true;//true:enable log display
11 |
12 | private static final int RETURN_NOLOG = 99;
13 |
14 | @SuppressWarnings("unused")
15 | public static int d(String msg) {
16 | return enableLog ? Log.d(LOG_TAG + ":", msg) : RETURN_NOLOG;
17 | }
18 |
19 | @SuppressWarnings("unused")
20 | public static int e(String msg) {
21 | return enableLog ? Log.e(LOG_TAG + ":", msg) : RETURN_NOLOG;
22 | }
23 |
24 | @SuppressWarnings("unused")
25 | public static int e(String msg, Throwable e) {
26 | return enableLog ? Log.e(LOG_TAG + ":", msg, e) : RETURN_NOLOG;
27 | }
28 |
29 | @SuppressWarnings("unused")
30 | public static int i(String msg) {
31 | return enableLog ? Log.i(LOG_TAG + ":", msg) : RETURN_NOLOG;
32 | }
33 |
34 | @SuppressWarnings("unused")
35 | public static int w(String msg) {
36 | return enableLog ? Log.w(LOG_TAG + ":", msg) : RETURN_NOLOG;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/view/HadEditText.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.view;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.EditText;
6 |
7 | import cn.hadcn.keyboard.emoticon.util.EmoticonHandler;
8 | import cn.hadcn.keyboard.utils.Utils;
9 |
10 | /**
11 | * @author chris
12 | */
13 | public class HadEditText extends EditText {
14 | private Context mContext;
15 |
16 | public HadEditText(Context context, AttributeSet attrs, int defStyle) {
17 | super(context, attrs, defStyle);
18 | mContext = context;
19 | }
20 |
21 | public HadEditText(Context context) {
22 | super(context);
23 | mContext = context;
24 | }
25 |
26 | public HadEditText(Context context, AttributeSet attrs) {
27 | super(context, attrs);
28 | mContext = context;
29 | }
30 |
31 | @Override
32 | protected void onTextChanged(CharSequence arg0, int start, int lengthBefore, int after) {
33 | super.onTextChanged(arg0, start, lengthBefore, after);
34 | if (onTextChangedInterface != null) {
35 | onTextChangedInterface.onTextChanged(arg0);
36 | }
37 | String content = arg0.subSequence(0, start + after).toString();
38 | EmoticonHandler.getInstance(mContext).setTextFace(content, getText(), start, Utils
39 | .getFontSize(getTextSize()));
40 | }
41 |
42 | public interface OnTextChangedInterface {
43 | void onTextChanged(CharSequence argo);
44 | }
45 |
46 | OnTextChangedInterface onTextChangedInterface;
47 |
48 | public void setOnTextChangedInterface(OnTextChangedInterface i) {
49 | onTextChangedInterface = i;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/view/IndicatorView.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.view;
2 |
3 | import android.content.Context;
4 | import android.graphics.drawable.Drawable;
5 | import android.support.v4.content.ContextCompat;
6 | import android.util.AttributeSet;
7 | import android.widget.ImageView;
8 | import android.widget.LinearLayout;
9 |
10 | import java.util.ArrayList;
11 |
12 | import cn.hadcn.keyboard.R;
13 |
14 | /**
15 | * @author chris
16 | */
17 | public class IndicatorView extends LinearLayout {
18 | private Context mContext;
19 | private ArrayList mImageViews = new ArrayList<>();
20 | private Drawable bmpSelect;
21 | private Drawable bmpNormal;
22 | private int mMargin = 0;
23 |
24 | public IndicatorView(Context context, AttributeSet attrs) {
25 | super(context, attrs);
26 | this.mContext = context;
27 | this.setOrientation(HORIZONTAL);
28 |
29 | bmpSelect = ContextCompat.getDrawable(mContext, R.drawable.indicator_point_select);
30 | bmpNormal = ContextCompat.getDrawable(mContext, R.drawable.indicator_point_normal);
31 | mMargin = getResources().getDimensionPixelSize(R.dimen.keyboard_indicator_margin);
32 | }
33 |
34 | public void setIndicatorCount(int count) {
35 | mImageViews.clear();
36 | this.removeAllViews();
37 | for (int i = 0; i < count; i++) {
38 | LayoutParams layoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams
39 | .WRAP_CONTENT);
40 | layoutParams.setMargins(mMargin, 0, mMargin, 0);
41 |
42 | ImageView imageView = new ImageView(mContext);
43 |
44 | if (i == 0) {
45 | imageView.setImageDrawable(bmpSelect);
46 | this.addView(imageView, layoutParams);
47 | } else {
48 | imageView.setImageDrawable(bmpNormal);
49 | this.addView(imageView, layoutParams);
50 | }
51 | mImageViews.add(imageView);
52 | }
53 | }
54 |
55 | public void moveTo(int position) {
56 | for (ImageView iv : mImageViews) {
57 | iv.setImageDrawable(bmpNormal);
58 | }
59 | mImageViews.get(position).setImageDrawable(bmpSelect);
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/view/SoftHandleLayout.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.view;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.util.AttributeSet;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.view.inputmethod.InputMethodManager;
9 | import android.widget.EditText;
10 | import android.widget.LinearLayout;
11 | import android.widget.RelativeLayout;
12 |
13 | import cn.hadcn.keyboard.R;
14 | import cn.hadcn.keyboard.utils.Utils;
15 |
16 | /**
17 | * handle the child view
18 | * and control keyboard area show or hide
19 | * @author chris
20 | */
21 | public class SoftHandleLayout extends SoftListenLayout {
22 | public static final int KEYBOARD_STATE_NONE = 100; // no pop
23 | public static final int KEYBOARD_STATE_FUNC = 101; // only media or emoticon pop
24 | public static final int KEYBOARD_STATE_BOTH = 102; // keyboard and media or emoticon pop
25 | // together
26 | protected int mAutoHeightLayoutId;
27 | protected int mAutoViewHeight;
28 | protected View mAutoHeightLayoutView;
29 | protected int mKeyboardState = KEYBOARD_STATE_NONE;
30 | private boolean isAutoViewNeedHide = true; //if soft keyboard close by itself, close auto
31 | // view too. if not, just close keyboard
32 |
33 | public SoftHandleLayout(Context context, AttributeSet attrs) {
34 | super(context, attrs);
35 | mAutoViewHeight = Utils.getDefKeyboardHeight(mContext);
36 | }
37 |
38 | @Override
39 | public void addView(View child, int index, ViewGroup.LayoutParams params) {
40 | int childSum = getChildCount();
41 | if (childSum > 1) {
42 | throw new IllegalStateException("can host only one direct child");
43 | }
44 | super.addView(child, index, params);
45 | if (childSum == 0) {
46 | mAutoHeightLayoutId = child.getId();
47 | if (mAutoHeightLayoutId < 0) {
48 | child.setId(R.id.keyboard_layout_id);
49 | mAutoHeightLayoutId = R.id.keyboard_layout_id;
50 | }
51 | LayoutParams paramsChild = (LayoutParams) child.getLayoutParams();
52 | paramsChild.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
53 | child.setLayoutParams(paramsChild);
54 | } else if (childSum == 1) {
55 | LayoutParams paramsChild = (LayoutParams) child.getLayoutParams();
56 | paramsChild.addRule(RelativeLayout.ABOVE, mAutoHeightLayoutId);
57 | child.setLayoutParams(paramsChild);
58 | }
59 | }
60 |
61 | /**
62 | * set height media or emoticons parent view
63 | *
64 | * @param view view
65 | */
66 | protected void setAutoHeightLayoutView(View view) {
67 | mAutoHeightLayoutView = view;
68 | }
69 |
70 | private void setAutoViewHeight(final int height) {
71 | if (height == 0) {
72 | mAutoHeightLayoutView.setVisibility(GONE);
73 | } else {
74 | mAutoHeightLayoutView.setVisibility(VISIBLE);
75 | LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) mAutoHeightLayoutView
76 | .getLayoutParams();
77 | params.height = height;
78 | mAutoHeightLayoutView.setLayoutParams(params);
79 | }
80 | // it will take some time for view draw
81 | this.postDelayed(new Runnable() {
82 | @Override
83 | public void run() {
84 | autoViewHeightChanged(height);
85 | }
86 | }, 100);
87 | }
88 |
89 | protected void hideAutoView() {
90 | post(new Runnable() {
91 | @Override
92 | public void run() {
93 | setAutoViewHeight(0);
94 | }
95 | });
96 | mKeyboardState = KEYBOARD_STATE_NONE;
97 | }
98 |
99 | protected void showAutoView() {
100 | // show auto view is after keyboard show will be better
101 | // there exist time during keyboard popping
102 | postDelayed(new Runnable() {
103 | @Override
104 | public void run() {
105 | setAutoViewHeight(mAutoViewHeight);
106 | }
107 | }, 150);
108 | isAutoViewNeedHide = true;
109 | mKeyboardState = KEYBOARD_STATE_FUNC;
110 | }
111 |
112 | protected void autoViewHeightChanged(final int height) {
113 | // rent the place for child use
114 | }
115 |
116 | @Override
117 | protected void onSoftKeyboardPop(int height) {
118 | if (height > 0 && height != mAutoViewHeight) {
119 | mAutoViewHeight = height;
120 | Utils.setDefKeyboardHeight(mContext, mAutoViewHeight);
121 | }
122 | //if soft keyboard popped, auto view must be visible, soft keyboard covers it
123 | if (mKeyboardState != KEYBOARD_STATE_BOTH) {
124 | showAutoView();
125 | } else {
126 | // else, just update auto view height
127 | postDelayed(new Runnable() {
128 | @Override
129 | public void run() {
130 | setAutoViewHeight(mAutoViewHeight);
131 | }
132 | }, 150);
133 | }
134 | mKeyboardState = KEYBOARD_STATE_BOTH;
135 | }
136 |
137 | @Override
138 | protected void onSoftKeyboardClose() {
139 | mKeyboardState = mKeyboardState == KEYBOARD_STATE_BOTH ? KEYBOARD_STATE_FUNC :
140 | KEYBOARD_STATE_NONE;
141 |
142 | // if keyboard closed isn't by calling close, but by pressing back button or keyboard
143 | // hide, hide auto view
144 | if (isAutoViewNeedHide) {
145 | hideAutoView();
146 | }
147 | isAutoViewNeedHide = true;
148 | }
149 |
150 | /**
151 | * display soft keyboard
152 | */
153 | protected void openSoftKeyboard(EditText et) {
154 | et.setFocusable(true);
155 | et.setFocusableInTouchMode(true);
156 | et.requestFocus();
157 | InputMethodManager inputManager = (InputMethodManager) et.getContext().getSystemService
158 | (Context.INPUT_METHOD_SERVICE);
159 | inputManager.showSoftInput(et, InputMethodManager.SHOW_IMPLICIT);
160 | }
161 |
162 | /**
163 | * close soft keyboard
164 | */
165 | protected void closeSoftKeyboard(EditText et) {
166 | InputMethodManager inputMethodManager = (InputMethodManager) mContext.getSystemService
167 | (Context.INPUT_METHOD_SERVICE);
168 | if (inputMethodManager != null && ((Activity) mContext).getCurrentFocus() != null) {
169 | inputMethodManager.hideSoftInputFromWindow(et.getWindowToken(), InputMethodManager
170 | .HIDE_NOT_ALWAYS);
171 | }
172 | isAutoViewNeedHide = false; //only if you close keyboard by calling method, auto view
173 | // don't need hide
174 | }
175 | }
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/view/SoftListenLayout.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.view;
2 |
3 | import static cn.hadcn.keyboard.utils.Utils.getDisplayHeightPixels;
4 | import android.app.Activity;
5 | import android.content.Context;
6 | import android.content.res.Resources;
7 | import android.graphics.Rect;
8 | import android.util.AttributeSet;
9 | import android.util.DisplayMetrics;
10 | import android.view.ViewTreeObserver;
11 | import android.widget.RelativeLayout;
12 |
13 | import java.lang.reflect.Field;
14 |
15 | import cn.hadcn.keyboard.utils.Utils;
16 |
17 | /**
18 | * listen keyboard show or hide
19 | * when keyboard show, keep parent layout height, make it not be shrank by keyboard
20 | * @author chris
21 | */
22 | public abstract class SoftListenLayout extends RelativeLayout {
23 | private int mMinLayoutHeight = 0;
24 | private int mMinKeyboardHeight = 0;
25 | private int mGlobalBottom = 0;
26 | private int mKeyboardHeight = 0;
27 | protected Context mContext;
28 | // 状态栏的高度
29 | private int statusBarHeight;
30 | // 底部虚拟按键的高度
31 | private int softButtonsBarHeight;
32 | // 软键盘的显示状态
33 | private boolean isShowKeyboard;
34 |
35 | public SoftListenLayout(final Context context, AttributeSet attrs) {
36 | super(context, attrs);
37 | mContext = context;
38 | int displayHeight = getDisplayHeightPixels(context);
39 | //the height of layout is at least 2/3 of screen height
40 | mMinLayoutHeight = displayHeight * 2 / 3;
41 |
42 | // min keyboard height, for ignoring navigation bar hide or show effects
43 | mMinKeyboardHeight = displayHeight / 3;
44 |
45 | mKeyboardHeight = Utils.getDefKeyboardHeight(mContext);
46 |
47 | statusBarHeight = getStatusBarHeight(mContext);
48 | softButtonsBarHeight = getSoftButtonsBarHeight((Activity) mContext);
49 |
50 | getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver
51 | .OnGlobalLayoutListener() {
52 | @Override
53 | public void onGlobalLayout() {
54 | Rect r = new Rect();
55 | ((Activity) getContext()).getWindow().getDecorView()
56 | .getWindowVisibleDisplayFrame(r);
57 |
58 | int screenHeight = ((Activity) getContext()).getWindow().getDecorView().getRootView().getHeight();
59 | int heightDiff = screenHeight - (r.bottom -r.top);
60 | if(mKeyboardHeight == 0 && heightDiff > statusBarHeight + softButtonsBarHeight){
61 | mKeyboardHeight = heightDiff -statusBarHeight -softButtonsBarHeight;
62 | }
63 |
64 | if (isShowKeyboard) {
65 | // 如果软键盘是弹出的状态,并且heightDiff小于等于 状态栏 + 虚拟按键 高度,
66 | // 说明这时软键盘已经收起
67 | if (heightDiff <= statusBarHeight + softButtonsBarHeight) {
68 | isShowKeyboard = false;
69 | OnSoftKeyboardClose();
70 | }
71 | } else {
72 | // 如果软键盘是收起的状态,并且heightDiff大于 状态栏 + 虚拟按键 高度,
73 | // 说明这时软键盘已经弹出
74 | if (heightDiff > statusBarHeight + softButtonsBarHeight) {
75 | isShowKeyboard = true;
76 | OnSoftKeyboardPop(mKeyboardHeight);
77 | }
78 | }
79 | }
80 | });
81 | }
82 |
83 | @Override
84 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
85 | int measureHeight = MeasureSpec.getSize(heightMeasureSpec);
86 | if (measureHeight < mMinLayoutHeight) {
87 | // if keyboard show, this layout height will be shrank, we should extend it
88 | int heightMode = MeasureSpec.getMode(heightMeasureSpec);
89 | int expandSpec = MeasureSpec.makeMeasureSpec(measureHeight + mKeyboardHeight,
90 | heightMode);
91 | super.onMeasure(widthMeasureSpec, expandSpec);
92 | } else {
93 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
94 | }
95 | }
96 |
97 | /**
98 | * 获取状态栏高度
99 | */
100 | public static int getStatusBarHeight(Context context) {
101 | int result = 0;
102 | int resourceId = Resources.getSystem().getIdentifier("status_bar_height", "dimen", "android");
103 | if (resourceId > 0) {
104 | result = Resources.getSystem().getDimensionPixelSize(resourceId);
105 | }
106 | return result;
107 | }
108 |
109 | /**
110 | * 获取底部虚拟按键的高度
111 | */
112 | public static int getSoftButtonsBarHeight(Activity activity) {
113 | DisplayMetrics metrics = new DisplayMetrics();
114 | activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
115 | int usableHeight = metrics.heightPixels;
116 | activity.getWindowManager().getDefaultDisplay().getRealMetrics(metrics);
117 | int realHeight = metrics.heightPixels;
118 | if (realHeight > usableHeight)
119 | return realHeight - usableHeight;
120 | else
121 | return 0;
122 | }
123 |
124 | protected abstract void OnSoftKeyboardPop(int height);
125 |
126 | protected abstract void OnSoftKeyboardClose();
127 | }
128 |
--------------------------------------------------------------------------------
/keyboard/src/main/java/cn/hadcn/keyboard/view/VerticalImageSpan.java:
--------------------------------------------------------------------------------
1 | package cn.hadcn.keyboard.view;
2 |
3 | import android.graphics.Canvas;
4 | import android.graphics.Paint;
5 | import android.graphics.Rect;
6 | import android.graphics.drawable.Drawable;
7 | import android.text.style.ImageSpan;
8 |
9 | /**
10 | * @author chris
11 | */
12 | public class VerticalImageSpan extends ImageSpan {
13 |
14 | public VerticalImageSpan(Drawable drawable) {
15 | super(drawable, ImageSpan.ALIGN_BOTTOM);
16 | }
17 |
18 | @Override
19 | public int getSize(Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm) {
20 | Drawable drawable = getDrawable();
21 | Rect rect = drawable.getBounds();
22 | if (fm != null) {
23 | Paint.FontMetricsInt fmPaint = paint.getFontMetricsInt();
24 | int fontHeight = fmPaint.bottom - fmPaint.top;
25 | int drHeight = rect.bottom - rect.top;
26 |
27 | int top = drHeight / 2 - fontHeight / 4;
28 | int bottom = drHeight / 2 + fontHeight / 4;
29 |
30 | fm.ascent = -bottom;
31 | fm.top = -bottom;
32 | fm.bottom = top;
33 | fm.descent = top;
34 | }
35 | return rect.right;
36 | }
37 |
38 | @Override
39 | public void draw(Canvas canvas, CharSequence text, int start, int end, float x, int top, int y, int bottom, Paint paint) {
40 | Drawable drawable = getDrawable();
41 | canvas.save();
42 | int transY = ((bottom - top) - drawable.getBounds().bottom) / 2 + top;
43 | canvas.translate(x, transY);
44 | drawable.draw(canvas);
45 | canvas.restore();
46 | }
47 | }
48 |
49 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f319.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f319.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f31f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f31f.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f339.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f339.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f33b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f33b.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f341.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f341.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f343.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f343.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f37a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f37a.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f380.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f380.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f381.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f381.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f382.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f382.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f385.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f385.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f3e0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f3e0.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f431.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f431.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f436.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f436.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f444.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f444.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f446.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f446.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f447.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f447.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f448.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f448.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f449.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f449.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f44a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f44a.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f44c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f44c.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f44d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f44d.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f44e.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f44e.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f44f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f44f.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f457.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f457.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f466.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f466.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f467.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f467.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f468.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f468.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f469.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f469.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f47b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f47b.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f47f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f47f.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f48e.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f48e.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f494.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f494.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f4a3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f4a3.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f4aa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f4aa.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f4f1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f4f1.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f50d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f50d.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f559.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f559.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f601.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f601.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f602.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f602.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f603.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f603.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f604.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f604.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f609.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f609.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f60a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f60a.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f60c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f60c.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f60d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f60d.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f60f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f60f.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f612.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f612.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f613.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f613.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f614.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f614.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f616.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f616.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f618.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f618.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f61a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f61a.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f61c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f61c.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f61d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f61d.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f61e.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f61e.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f620.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f620.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f621.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f621.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f622.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f622.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f623.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f623.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f625.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f625.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f628.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f628.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f62a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f62a.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f62d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f62d.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f630.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f630.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f631.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f631.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f632.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f632.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f633.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f633.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f637.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f637.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f64f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f64f.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x1f697.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x1f697.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x2600.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x2600.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x2601.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x2601.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x2614.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x2614.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x2615.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x2615.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x26a1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x26a1.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x26bd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x26bd.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x270a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x270a.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x270c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x270c.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/emoji_0x2764.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/emoji_0x2764.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/icon_del.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/icon_del.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/icon_emoji.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/icon_emoji.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/icon_face_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/icon_face_normal.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/icon_face_pop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/icon_face_pop.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/input_bar_flat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/input_bar_flat.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/input_bg.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/input_bg.9.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/input_bg_gray.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/input_bg_gray.9.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/input_bg_green.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/input_bg_green.9.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/recording_cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/recording_cancel.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/recording_level_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/recording_level_1.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/recording_level_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/recording_level_2.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/recording_level_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/recording_level_3.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/recording_level_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/recording_level_4.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/recording_level_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/recording_level_5.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/recording_level_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/recording_level_6.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/recording_level_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/recording_level_7.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-hdpi/recording_mic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-hdpi/recording_mic.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-xhdpi/default_keyboard_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-xhdpi/default_keyboard_icon.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-xhdpi/default_record_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-xhdpi/default_record_icon.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable-xhdpi/default_right_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/keyboard/src/main/res/drawable-xhdpi/default_right_icon.png
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable/btn_input_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable/btn_voice_press.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
11 |
12 |
13 |
16 |
17 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable/circle_button_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | -
5 |
6 |
7 |
9 |
10 |
11 |
12 | -
13 |
14 |
15 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable/emoticon_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable/indicator_point_normal.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable/indicator_point_select.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable/keyboard_face_icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable/media_image_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 | -
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable/recording_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable/recording_n.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
12 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable/recording_p.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
12 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable/recording_text_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable/send_button_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 | -
10 |
11 |
12 |
13 |
14 |
15 | -
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/drawable/transparent_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/layout/keyboard_bar_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
13 |
16 |
25 |
35 |
42 |
52 |
53 |
61 |
72 |
77 |
92 |
103 |
104 |
105 |
106 |
113 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/layout/keyboard_emoticon_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
13 |
20 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/layout/keyboard_emoticon_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
12 |
18 |
24 |
32 |
39 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/layout/keyboard_emoticon_tabbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
14 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/layout/keyboard_emoticon_tabbar_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
10 |
16 |
17 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/layout/keyboard_media_item.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
19 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/layout/keyboard_media_layout.xml:
--------------------------------------------------------------------------------
1 |
5 |
9 |
14 |
22 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/layout/keyboard_media_page.xml:
--------------------------------------------------------------------------------
1 |
10 |
17 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/layout/keyboard_recording_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
16 |
21 |
22 |
28 |
34 |
43 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/values-zh-rTW/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 送出
4 | 按住 說話
5 | 放開 結束
6 | 放開,取消送出
7 | 往上滑,取消送出
8 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
8 |
10 |
11 |
13 |
15 |
17 |
19 |
20 |
21 |
23 |
24 |
26 |
27 |
29 |
30 |
32 |
33 |
35 |
36 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 | #000000
5 | #CFCFCF
6 | #D9D9D9
7 | #FFFFFF
8 | #BBBBBB
9 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 8dp
3 | 5dp
4 | 35dp
5 | 0.6dp
6 | 50dp
7 | 50dp
8 | 60dp
9 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/keyboard/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 发送
4 | 按住 说话
5 | 松开 结束
6 | 松开手指,取消发送
7 | 手指上滑,取消发送
8 |
--------------------------------------------------------------------------------
/raw/chat_style.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/raw/chat_style.png
--------------------------------------------------------------------------------
/raw/text_emoticon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/raw/text_emoticon.png
--------------------------------------------------------------------------------
/raw/text_only.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CPPAlien/ChatKeyboard/7b256389a990e72cb23fac2d28247838392f8a25/raw/text_only.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':keyboard'
2 |
--------------------------------------------------------------------------------