├── bin ├── classes.dex ├── resources.ap_ ├── ColorPhrase.apk ├── classes │ └── com │ │ ├── example │ │ └── colorphrase │ │ │ ├── R.class │ │ │ ├── R$attr.class │ │ │ ├── R$id.class │ │ │ ├── R$menu.class │ │ │ ├── R$dimen.class │ │ │ ├── R$layout.class │ │ │ ├── R$string.class │ │ │ ├── R$style.class │ │ │ ├── BuildConfig.class │ │ │ ├── R$drawable.class │ │ │ ├── MainActivity.class │ │ │ └── MainActivity$1.class │ │ └── medusa │ │ └── lib │ │ ├── ColorPhrase.class │ │ ├── ColorPhrase$Token.class │ │ ├── ColorPhrase$InnerToken.class │ │ ├── ColorPhrase$OuterToken.class │ │ └── ColorPhrase$LeftSeparatorToken.class ├── res │ └── crunch │ │ ├── drawable-hdpi │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ │ └── drawable-xxhdpi │ │ └── ic_launcher.png ├── dexedLibs │ └── android-support-v4-280ef5398d81ad2ece5360949c0b77e8.jar └── AndroidManifest.xml ├── ic_launcher-web.png ├── libs └── android-support-v4.jar ├── res ├── drawable-hdpi │ └── ic_launcher.png ├── drawable-mdpi │ └── ic_launcher.png ├── drawable-xhdpi │ └── ic_launcher.png ├── drawable-xxhdpi │ └── ic_launcher.png ├── values-sw600dp │ └── dimens.xml ├── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── menu │ └── main.xml ├── values-sw720dp-land │ └── dimens.xml ├── values-v11 │ └── styles.xml ├── values-v14 │ └── styles.xml └── layout │ └── activity_main.xml ├── screenshot └── Screenshot_2015-05-16-18-12-23.jpeg ├── .settings └── org.eclipse.jdt.core.prefs ├── gen └── com │ └── example │ └── colorphrase │ ├── BuildConfig.java │ └── R.java ├── .gitattributes ├── .classpath ├── project.properties ├── .gitignore ├── README.md ├── proguard-project.txt ├── .project ├── AndroidManifest.xml └── src └── com ├── example └── colorphrase │ └── MainActivity.java └── medusa └── lib └── ColorPhrase.java /bin/classes.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes.dex -------------------------------------------------------------------------------- /bin/resources.ap_: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/resources.ap_ -------------------------------------------------------------------------------- /bin/ColorPhrase.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/ColorPhrase.apk -------------------------------------------------------------------------------- /ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/ic_launcher-web.png -------------------------------------------------------------------------------- /libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/libs/android-support-v4.jar -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/classes/com/example/colorphrase/R.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/example/colorphrase/R.class -------------------------------------------------------------------------------- /bin/classes/com/medusa/lib/ColorPhrase.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/medusa/lib/ColorPhrase.class -------------------------------------------------------------------------------- /bin/res/crunch/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/res/crunch/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/crunch/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/res/crunch/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/crunch/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/res/crunch/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/classes/com/example/colorphrase/R$attr.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/example/colorphrase/R$attr.class -------------------------------------------------------------------------------- /bin/classes/com/example/colorphrase/R$id.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/example/colorphrase/R$id.class -------------------------------------------------------------------------------- /bin/classes/com/example/colorphrase/R$menu.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/example/colorphrase/R$menu.class -------------------------------------------------------------------------------- /bin/res/crunch/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/res/crunch/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /screenshot/Screenshot_2015-05-16-18-12-23.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/screenshot/Screenshot_2015-05-16-18-12-23.jpeg -------------------------------------------------------------------------------- /bin/classes/com/example/colorphrase/R$dimen.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/example/colorphrase/R$dimen.class -------------------------------------------------------------------------------- /bin/classes/com/example/colorphrase/R$layout.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/example/colorphrase/R$layout.class -------------------------------------------------------------------------------- /bin/classes/com/example/colorphrase/R$string.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/example/colorphrase/R$string.class -------------------------------------------------------------------------------- /bin/classes/com/example/colorphrase/R$style.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/example/colorphrase/R$style.class -------------------------------------------------------------------------------- /bin/classes/com/medusa/lib/ColorPhrase$Token.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/medusa/lib/ColorPhrase$Token.class -------------------------------------------------------------------------------- /bin/classes/com/example/colorphrase/BuildConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/example/colorphrase/BuildConfig.class -------------------------------------------------------------------------------- /bin/classes/com/example/colorphrase/R$drawable.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/example/colorphrase/R$drawable.class -------------------------------------------------------------------------------- /bin/classes/com/example/colorphrase/MainActivity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/example/colorphrase/MainActivity.class -------------------------------------------------------------------------------- /bin/classes/com/medusa/lib/ColorPhrase$InnerToken.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/medusa/lib/ColorPhrase$InnerToken.class -------------------------------------------------------------------------------- /bin/classes/com/medusa/lib/ColorPhrase$OuterToken.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/medusa/lib/ColorPhrase$OuterToken.class -------------------------------------------------------------------------------- /bin/classes/com/example/colorphrase/MainActivity$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/example/colorphrase/MainActivity$1.class -------------------------------------------------------------------------------- /bin/classes/com/medusa/lib/ColorPhrase$LeftSeparatorToken.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/classes/com/medusa/lib/ColorPhrase$LeftSeparatorToken.class -------------------------------------------------------------------------------- /bin/dexedLibs/android-support-v4-280ef5398d81ad2ece5360949c0b77e8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/THEONE10211024/ColorPhrase/HEAD/bin/dexedLibs/android-support-v4-280ef5398d81ad2ece5360949c0b77e8.jar -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.source=1.6 5 | -------------------------------------------------------------------------------- /gen/com/example/colorphrase/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** Automatically generated file. DO NOT MODIFY */ 2 | package com.example.colorphrase; 3 | 4 | public final class BuildConfig { 5 | public final static boolean DEBUG = true; 6 | } -------------------------------------------------------------------------------- /res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 128dp 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ColorPhrase 5 | Settings 6 | Hello world! 7 | 紫陌红尘,蓦然{回首}。多少的{春花秋月};多少的{逝水沉香};多少的{海誓山盟},如沿途的风景{花开花谢}。人世间的情缘{触痛了}多少无言的{感慨},{情深缘浅}的风吹散了多少{相聚离散}。花开是有情,花落是无意。来者是{萍水相逢},去者是{江湖相忘}。缘起时,我在{人群}中看到你。缘灭时,你{消失}在人群中。 8 | 9 | 10 | -------------------------------------------------------------------------------- /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-19 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | -------------------------------------------------------------------------------- /res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ColorPhrase 2 | Phrase is an Android string resource color setting library 3 | 4 | ## Usage 5 | ```java 6 | CharSequence formatted = ColorPhrase.from("I'm {Chinese}, I love {China}") 7 | .withSeparator("{}") 8 | .innerColor(0xFFE6454A) 9 | .outerColor(0xFF666666) 10 | .format(); 11 | ``` 12 | ## Preview 13 | ![sample](https://github.com/THEONE10211024/ColorPhrase/blob/master/screenshot/Screenshot_2015-05-16-18-12-23.jpeg) 14 | ##Download 15 | 1)download the project 16 | 2)find ColorPhrase.java in "\src\com\medusa\lib" and copy it into your project 17 | 3)then you can use it! 18 | 4)ps: you should include the android-support-v4.jar in your porject 19 | [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-ColorPhrase-green.svg?style=flat)](https://android-arsenal.com/details/1/1915) 20 | -------------------------------------------------------------------------------- /proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ColorPhrase 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /bin/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 12 | 13 | 20 | 21 | 22 | 23 | 24 | 30 | 31 |