├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── e1.png │ │ │ │ ├── e10.png │ │ │ │ ├── e11.png │ │ │ │ ├── e12.png │ │ │ │ ├── e13.png │ │ │ │ ├── e14.png │ │ │ │ ├── e15.png │ │ │ │ ├── e16.png │ │ │ │ ├── e17.png │ │ │ │ ├── e18.png │ │ │ │ ├── e19.png │ │ │ │ ├── e2.png │ │ │ │ ├── e20.png │ │ │ │ ├── e21.png │ │ │ │ ├── e22.png │ │ │ │ ├── e23.png │ │ │ │ ├── e24.png │ │ │ │ ├── e25.png │ │ │ │ ├── e26.png │ │ │ │ ├── e27.png │ │ │ │ ├── e28.png │ │ │ │ ├── e29.png │ │ │ │ ├── e3.png │ │ │ │ ├── e30.png │ │ │ │ ├── e31.png │ │ │ │ ├── e32.png │ │ │ │ ├── e33.png │ │ │ │ ├── e34.png │ │ │ │ ├── e35.png │ │ │ │ ├── e36.png │ │ │ │ ├── e37.png │ │ │ │ ├── e38.png │ │ │ │ ├── e39.png │ │ │ │ ├── e4.png │ │ │ │ ├── e40.png │ │ │ │ ├── e41.png │ │ │ │ ├── e42.png │ │ │ │ ├── e43.png │ │ │ │ ├── e44.png │ │ │ │ ├── e45.png │ │ │ │ ├── e46.png │ │ │ │ ├── e47.png │ │ │ │ ├── e48.png │ │ │ │ ├── e49.png │ │ │ │ ├── e5.png │ │ │ │ ├── e50.png │ │ │ │ ├── e51.png │ │ │ │ ├── e52.png │ │ │ │ ├── e53.png │ │ │ │ ├── e54.png │ │ │ │ ├── e55.png │ │ │ │ ├── e56.png │ │ │ │ ├── e57.png │ │ │ │ ├── e58.png │ │ │ │ ├── e59.png │ │ │ │ ├── e6.png │ │ │ │ ├── e60.png │ │ │ │ ├── e61.png │ │ │ │ ├── e62.png │ │ │ │ ├── e63.png │ │ │ │ ├── e7.png │ │ │ │ ├── e8.png │ │ │ │ ├── e9.png │ │ │ │ ├── ly2.jpg │ │ │ │ ├── gxx1.png │ │ │ │ ├── gxx2.png │ │ │ │ ├── gxx3.png │ │ │ │ ├── gxx4.png │ │ │ │ ├── gxx5.png │ │ │ │ ├── gxx6.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── publish_at_d3x.png │ │ │ │ ├── publish_face_n3x.png │ │ │ │ ├── delete_expression.png │ │ │ │ ├── page_indicator_focused.png │ │ │ │ └── page_indicator_unfocused.png │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ └── layout │ │ │ │ ├── activity_user_list.xml │ │ │ │ ├── user_list_item.xml │ │ │ │ ├── smile_image_row_expression.xml │ │ │ │ ├── expression_gridview.xml │ │ │ │ ├── layout_emoji_container.xml │ │ │ │ └── activity_main.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── mryu │ │ │ │ └── richeditor │ │ │ │ ├── model │ │ │ │ ├── UserModel.java │ │ │ │ └── InsertModel.java │ │ │ │ ├── RichEditor │ │ │ │ ├── widget │ │ │ │ │ ├── LockGridView.java │ │ │ │ │ └── EmojiLayout.java │ │ │ │ ├── adapter │ │ │ │ │ ├── ExpressionPagerAdapter.java │ │ │ │ │ └── SmileImageExpressionAdapter.java │ │ │ │ ├── Util │ │ │ │ │ └── ScreenUtils.java │ │ │ │ └── RichEditor.java │ │ │ │ ├── UserListActivity.java │ │ │ │ ├── StockListActivity.java │ │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── mryu │ │ │ └── richeditor │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── mryu │ │ └── richeditor │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── .idea ├── copyright │ └── profiles_settings.xml ├── modules.xml ├── runConfigurations.xml ├── gradle.xml ├── compiler.xml └── misc.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── README.md └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RichEditor 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e10.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e11.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e12.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e13.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e14.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e15.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e16.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e17.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e18.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e19.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e20.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e21.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e22.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e23.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e25.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e26.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e27.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e28.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e29.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e30.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e31.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e32.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e33.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e34.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e35.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e36.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e37.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e38.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e39.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e4.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e40.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e41.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e42.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e43.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e44.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e45.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e46.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e47.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e48.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e49.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e5.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e50.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e51.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e51.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e52.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e52.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e53.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e53.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e54.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e54.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e55.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e56.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e56.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e57.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e58.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e59.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e59.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e6.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e60.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e61.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e61.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e62.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e62.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e63.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e63.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e7.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e8.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/e9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/e9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ly2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/ly2.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/gxx1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/gxx1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/gxx2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/gxx2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/gxx3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/gxx3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/gxx4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/gxx4.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/gxx5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/gxx5.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/gxx6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/gxx6.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/publish_at_d3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/publish_at_d3x.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/publish_face_n3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/publish_face_n3x.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/delete_expression.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/delete_expression.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/page_indicator_focused.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/page_indicator_focused.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/page_indicator_unfocused.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/change9326/RichEditor/HEAD/app/src/main/res/drawable-xxhdpi/page_indicator_unfocused.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Jun 13 10:55:15 CST 2017 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-3.3-all.zip 7 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | #FFFFFF 8 | #EFEFEF 9 | #f77500 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_user_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/user_list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/test/java/com/mryu/richeditor/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.mryu.richeditor; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/smile_image_row_expression.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/mryu/richeditor/model/UserModel.java: -------------------------------------------------------------------------------- 1 | package com.mryu.richeditor.model; 2 | 3 | import java.io.Serializable; 4 | 5 | 6 | public class UserModel implements Serializable { 7 | 8 | private String user_name; 9 | 10 | private String user_id; 11 | 12 | public String getUser_name() { 13 | return user_name; 14 | } 15 | 16 | public void setUser_name(String user_name) { 17 | this.user_name = user_name; 18 | } 19 | 20 | public String getUser_id() { 21 | return user_id; 22 | } 23 | 24 | public void setUser_id(String user_id) { 25 | this.user_id = user_id; 26 | } 27 | 28 | @Override 29 | public String toString() { 30 | return this.user_name; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/mryu/richeditor/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.mryu.richeditor; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.mryu.richeditor", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/expression_gridview.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /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:\Work\2017\DevSoft\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 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.2" 6 | defaultConfig { 7 | applicationId "com.mryu.richeditor" 8 | minSdkVersion 15 9 | targetSdkVersion 25 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | compile 'com.android.support:appcompat-v7:25.3.1' 28 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 29 | testCompile 'junit:junit:4.12' 30 | //依赖注入 31 | compile 'com.jakewharton:butterknife:8.5.1' 32 | annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1' 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_emoji_container.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 21 | 22 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/mryu/richeditor/RichEditor/widget/LockGridView.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2013-2014 EaseMob Technologies. All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | package com.mryu.richeditor.RichEditor.widget; 15 | 16 | import android.content.Context; 17 | import android.util.AttributeSet; 18 | import android.widget.GridView; 19 | 20 | public class LockGridView extends GridView { 21 | 22 | public LockGridView(Context context) { 23 | super(context); 24 | } 25 | 26 | public LockGridView(Context context, AttributeSet attrs) { 27 | super(context, attrs); 28 | } 29 | 30 | 31 | @Override 32 | public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 33 | int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); 34 | super.onMeasure(widthMeasureSpec, expandSpec); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/mryu/richeditor/model/InsertModel.java: -------------------------------------------------------------------------------- 1 | package com.mryu.richeditor.model; 2 | 3 | /** 4 | * Created by MryU93 on 2017/6/15. 5 | * Desc: 6 | */ 7 | 8 | public class InsertModel { 9 | private String insertRule; 10 | private String insertContent; 11 | private String insertColor; 12 | 13 | public InsertModel(String insertRule, String insertContent, String insertColor) { 14 | this.insertRule = insertRule; 15 | this.insertContent = insertContent; 16 | this.insertColor = insertColor; 17 | } 18 | 19 | public String getInsertRule() { 20 | return insertRule; 21 | } 22 | 23 | public void setInsertRule(String insertRule) { 24 | this.insertRule = insertRule; 25 | } 26 | 27 | public String getInsertContent() { 28 | return insertContent; 29 | } 30 | 31 | public void setInsertContent(String insertContent) { 32 | this.insertContent = insertContent; 33 | } 34 | 35 | public String getInsertColor() { 36 | return insertColor; 37 | } 38 | 39 | public void setInsertColor(String insertColor) { 40 | this.insertColor = insertColor; 41 | } 42 | 43 | @Override 44 | public String toString() { 45 | return "InsertModel{" + 46 | "insertRule='" + insertRule + '\'' + 47 | ", insertContent='" + insertContent + '\'' + 48 | ", insertColor='" + insertColor + '\'' + 49 | '}'; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/com/mryu/richeditor/RichEditor/adapter/ExpressionPagerAdapter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2013-2014 EaseMob Technologies. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | package com.mryu.richeditor.RichEditor.adapter; 15 | 16 | import android.support.v4.view.PagerAdapter; 17 | import android.support.v4.view.ViewPager; 18 | import android.view.View; 19 | 20 | import java.util.List; 21 | 22 | public class ExpressionPagerAdapter extends PagerAdapter { 23 | 24 | private List views; 25 | 26 | public ExpressionPagerAdapter(List views) { 27 | this.views = views; 28 | } 29 | 30 | @Override 31 | public int getCount() { 32 | return views.size(); 33 | } 34 | 35 | @Override 36 | public boolean isViewFromObject(View arg0, Object arg1) { 37 | return arg0 == arg1; 38 | } 39 | 40 | @Override 41 | public Object instantiateItem(View arg0, int arg1) { 42 | ((ViewPager) arg0).addView(views.get(arg1)); 43 | return views.get(arg1); 44 | } 45 | 46 | @Override 47 | public void destroyItem(View arg0, int arg1, Object arg2) { 48 | ((ViewPager) arg0).removeView(views.get(arg1)); 49 | 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/mryu/richeditor/RichEditor/adapter/SmileImageExpressionAdapter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2013-2014 EaseMob Technologies. All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | package com.mryu.richeditor.RichEditor.adapter; 15 | 16 | import android.content.Context; 17 | import android.view.View; 18 | import android.view.ViewGroup; 19 | import android.widget.ArrayAdapter; 20 | import android.widget.ImageView; 21 | 22 | import com.mryu.richeditor.R; 23 | import com.mryu.richeditor.RichEditor.RichEditor; 24 | 25 | import java.util.List; 26 | 27 | 28 | public class SmileImageExpressionAdapter extends ArrayAdapter { 29 | 30 | public SmileImageExpressionAdapter(Context context, int textViewResourceId, List objects) { 31 | super(context, textViewResourceId, objects); 32 | } 33 | 34 | 35 | @Override 36 | public View getView(int position, View convertView, ViewGroup parent) { 37 | if (convertView == null) { 38 | convertView = View.inflate(getContext(), R.layout.smile_image_row_expression, null); 39 | } 40 | 41 | ImageView imageView = (ImageView) convertView.findViewById(R.id.iv_expression); 42 | 43 | String filename = getItem(position); 44 | int resId = RichEditor.ParseIconResId(filename); 45 | imageView.setImageResource(resId); 46 | return convertView; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/mryu/richeditor/UserListActivity.java: -------------------------------------------------------------------------------- 1 | package com.mryu.richeditor; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.os.Bundle; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.view.View; 8 | import android.widget.AdapterView; 9 | import android.widget.ArrayAdapter; 10 | import android.widget.ListView; 11 | 12 | import com.mryu.richeditor.model.UserModel; 13 | 14 | import java.util.ArrayList; 15 | import java.util.List; 16 | 17 | import butterknife.BindView; 18 | import butterknife.ButterKnife; 19 | 20 | /** 21 | * Created by MryU93 on 2017/6/13. 22 | * Desc: 23 | */ 24 | 25 | public class UserListActivity extends AppCompatActivity { 26 | 27 | public final static String DATA = "data"; 28 | 29 | @BindView(R.id.user_list) 30 | ListView userList; 31 | 32 | private List data = new ArrayList<>(); 33 | 34 | @Override 35 | protected void onCreate(Bundle savedInstanceState) { 36 | super.onCreate(savedInstanceState); 37 | setContentView(R.layout.activity_user_list); 38 | ButterKnife.bind(this); 39 | 40 | for (int i = 0; i < 50; i++) { 41 | UserModel userModel = new UserModel(); 42 | userModel.setUser_name("小明" + i); 43 | userModel.setUser_id(i * 30 + ""); 44 | data.add(userModel); 45 | } 46 | 47 | ArrayAdapter adapter = new ArrayAdapter(this, R.layout.user_list_item, data); 48 | userList.setAdapter(adapter); 49 | userList.setOnItemClickListener(new AdapterView.OnItemClickListener() { 50 | @Override 51 | public void onItemClick(AdapterView parent, View view, int position, long id) { 52 | Intent intent = new Intent(); 53 | intent.putExtra(DATA, data.get(position)); 54 | setResult(Activity.RESULT_OK, intent); 55 | finish(); 56 | } 57 | }); 58 | 59 | } 60 | 61 | 62 | } 63 | -------------------------------------------------------------------------------- /app/src/main/java/com/mryu/richeditor/StockListActivity.java: -------------------------------------------------------------------------------- 1 | package com.mryu.richeditor; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.os.Bundle; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.view.View; 8 | import android.widget.AdapterView; 9 | import android.widget.ArrayAdapter; 10 | import android.widget.ListView; 11 | 12 | import com.mryu.richeditor.model.UserModel; 13 | 14 | import java.util.ArrayList; 15 | import java.util.List; 16 | 17 | import butterknife.BindView; 18 | import butterknife.ButterKnife; 19 | 20 | /** 21 | * Created by MryU93 on 2017/6/13. 22 | * Desc: 23 | */ 24 | 25 | public class StockListActivity extends AppCompatActivity { 26 | 27 | public final static String DATA = "data"; 28 | 29 | @BindView(R.id.user_list) 30 | ListView userList; 31 | 32 | private List data = new ArrayList<>(); 33 | 34 | @Override 35 | protected void onCreate(Bundle savedInstanceState) { 36 | super.onCreate(savedInstanceState); 37 | setContentView(R.layout.activity_user_list); 38 | ButterKnife.bind(this); 39 | 40 | for (int i = 0; i < 50; i++) { 41 | UserModel userModel = new UserModel(); 42 | userModel.setUser_name("股票代码" + i); 43 | userModel.setUser_id(i * 30 + ""); 44 | data.add(userModel); 45 | } 46 | 47 | ArrayAdapter adapter = new ArrayAdapter(this, R.layout.user_list_item, data); 48 | userList.setAdapter(adapter); 49 | userList.setOnItemClickListener(new AdapterView.OnItemClickListener() { 50 | @Override 51 | public void onItemClick(AdapterView parent, View view, int position, long id) { 52 | Intent intent = new Intent(); 53 | intent.putExtra(DATA, data.get(position)); 54 | setResult(Activity.RESULT_OK, intent); 55 | finish(); 56 | } 57 | }); 58 | 59 | } 60 | 61 | 62 | } 63 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/mryu/richeditor/RichEditor/Util/ScreenUtils.java: -------------------------------------------------------------------------------- 1 | package com.mryu.richeditor.RichEditor.Util; 2 | 3 | import android.content.Context; 4 | import android.util.DisplayMetrics; 5 | import android.view.WindowManager; 6 | 7 | /** 8 | * Created by MryU93 on 2017/6/13. 9 | * Desc: 10 | */ 11 | 12 | public class ScreenUtils { 13 | 14 | /** 15 | * sp转为px 16 | */ 17 | public static int sp2px(Context context, float spValue) { 18 | float fontScale = context.getResources().getDisplayMetrics().density; 19 | return (int) (spValue * fontScale + 0.5f); 20 | } 21 | 22 | /** 23 | * px转为sp 24 | */ 25 | public static int px2sp(Context context, float pxValue) { 26 | final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; 27 | return (int) (pxValue / fontScale + 0.5f); 28 | } 29 | 30 | /** 31 | * dip转为PX 32 | */ 33 | public static int dip2px(Context context, float dipValue) { 34 | float fontScale = context.getResources().getDisplayMetrics().density; 35 | return (int) (dipValue * fontScale + 0.5f); 36 | } 37 | 38 | /** 39 | * 根据手机的分辨率从 px(像素) 的单位 转成为 dp 40 | */ 41 | public static int px2dip(Context context, float pxValue) { 42 | final float scale = context.getResources().getDisplayMetrics().density; 43 | return (int) (pxValue / scale + 0.5f); 44 | } 45 | 46 | /** 47 | * 获取屏幕的宽度px 48 | * 49 | * @param context 上下文 50 | * @return 屏幕宽px 51 | */ 52 | public static int getScreenWidth(Context context) { 53 | WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); 54 | DisplayMetrics outMetrics = new DisplayMetrics();// 创建了一张白纸 55 | windowManager.getDefaultDisplay().getMetrics(outMetrics);// 给白纸设置宽高 56 | return outMetrics.widthPixels; 57 | } 58 | 59 | /** 60 | * 获取屏幕的高度px 61 | * 62 | * @param context 上下文 63 | * @return 屏幕高px 64 | */ 65 | public static int getScreenHeight(Context context) { 66 | WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); 67 | DisplayMetrics outMetrics = new DisplayMetrics();// 创建了一张白纸 68 | windowManager.getDefaultDisplay().getMetrics(outMetrics);// 给白纸设置宽高 69 | return outMetrics.heightPixels; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 19 | 20 |