├── app ├── .gitignore ├── src │ ├── main │ │ ├── assets │ │ │ ├── xposed_init │ │ │ └── donate_wechat.png │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── ic_done.png │ │ │ │ ├── fab_label_background.xml │ │ │ │ ├── bg_listview_item.xml │ │ │ │ ├── button_static_bg.xml │ │ │ │ └── button_bg.xml │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_exit.png │ │ │ │ ├── ic_home.png │ │ │ │ ├── ic_info.png │ │ │ │ ├── ic_backup.png │ │ │ │ ├── ic_default.png │ │ │ │ ├── ic_refresh.png │ │ │ │ ├── ic_restore.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_settings.png │ │ │ │ ├── ic_back_white_24dp.png │ │ │ │ ├── ic_favorite_white_24dp.png │ │ │ │ ├── ic_more_vert_white_24dp.png │ │ │ │ ├── ic_content_cut_white_24dp.png │ │ │ │ ├── ic_select_all_white_24dp.png │ │ │ │ ├── ic_content_copy_white_24dp.png │ │ │ │ └── ic_content_paste_white_24dp.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_exit.png │ │ │ │ ├── ic_home.png │ │ │ │ ├── ic_info.png │ │ │ │ ├── ic_backup.png │ │ │ │ ├── ic_default.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_refresh.png │ │ │ │ ├── ic_restore.png │ │ │ │ ├── ic_settings.png │ │ │ │ ├── ic_back_white_24dp.png │ │ │ │ ├── ic_user_background.jpg │ │ │ │ ├── ic_favorite_white_24dp.png │ │ │ │ ├── ic_more_vert_white_24dp.png │ │ │ │ ├── ic_select_all_white_24dp.png │ │ │ │ ├── ic_content_copy_white_24dp.png │ │ │ │ ├── ic_content_cut_white_24dp.png │ │ │ │ └── ic_content_paste_white_24dp.png │ │ │ ├── values-v19 │ │ │ │ └── dimens.xml │ │ │ ├── values │ │ │ │ ├── attrs.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── values-v21 │ │ │ │ └── dimens.xml │ │ │ ├── layout │ │ │ │ ├── list_fragment.xml │ │ │ │ ├── list_fragment_app.xml │ │ │ │ ├── preference_category_widget.xml │ │ │ │ ├── dialog_json_input.xml │ │ │ │ ├── activity_app_list.xml │ │ │ │ ├── activity_settings.xml │ │ │ │ ├── list_item_restore.xml │ │ │ │ ├── navigation_content.xml │ │ │ │ ├── preference_item.xml │ │ │ │ ├── navigation_header.xml │ │ │ │ ├── list_item_card_app.xml │ │ │ │ ├── activity_set_text.xml │ │ │ │ ├── setting_item.xml │ │ │ │ ├── activity_donate.xml │ │ │ │ └── list_item_card_text.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── color │ │ │ │ └── item_color.xml │ │ │ ├── menu │ │ │ │ ├── menu_app_list.xml │ │ │ │ ├── menu_action_mode.xml │ │ │ │ ├── drawer_view.xml │ │ │ │ └── menu_set_text.xml │ │ │ ├── xml │ │ │ │ └── preferences.xml │ │ │ ├── values-ru │ │ │ │ └── strings.xml │ │ │ ├── values-zh-rHK │ │ │ │ └── strings.xml │ │ │ ├── values-id │ │ │ │ └── strings.xml │ │ │ ├── values-de │ │ │ │ └── strings.xml │ │ │ ├── values-zh-rCN │ │ │ │ └── strings.xml │ │ │ └── values-zh-rTW │ │ │ │ └── strings.xml │ │ ├── java │ │ │ └── liubaoyua │ │ │ │ └── customtext │ │ │ │ ├── entity │ │ │ │ ├── DataLoadedEvent.java │ │ │ │ ├── AppInfo.java │ │ │ │ ├── CustomText.java │ │ │ │ └── AppPreference.java │ │ │ │ ├── utils │ │ │ │ ├── XposedUtil.java │ │ │ │ ├── PicassoTools.java │ │ │ │ ├── IconLoader.java │ │ │ │ ├── DBHelper.java │ │ │ │ ├── Common.java │ │ │ │ ├── AppListFilter.java │ │ │ │ └── DBManager.java │ │ │ │ ├── app │ │ │ │ ├── AppHelper.java │ │ │ │ └── MyApplication.java │ │ │ │ ├── fragments │ │ │ │ ├── FragmentAdapter.java │ │ │ │ └── AppListFragment.java │ │ │ │ ├── ui │ │ │ │ ├── SettingActivity.java │ │ │ │ └── DonateActivity.java │ │ │ │ ├── adapters │ │ │ │ ├── AppRecyclerAdapter.java │ │ │ │ └── TextRecyclerAdapter.java │ │ │ │ └── HookMethod.java │ │ └── AndroidManifest.xml │ └── androidTest │ │ └── java │ │ └── liubaoyua │ │ └── customtext │ │ └── ApplicationTest.java ├── app-release.apk ├── libs │ └── pinyin4j-2.5.0.jar ├── deps │ └── XposedBridgeApi-52.jar ├── app.iml ├── build.gradle └── proguard-rules.pro ├── settings.gradle ├── README.md ├── .idea ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── vcs.xml ├── compiler.xml └── misc.xml ├── .gitignore ├── gradle.properties ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /app/src/main/assets/xposed_init: -------------------------------------------------------------------------------- 1 | liubaoyua.customtext.HookMethod -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CustomText-MD 2 | CustomText with MD 3 | 文本自定义 MD 4 | -------------------------------------------------------------------------------- /app/app-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/app-release.apk -------------------------------------------------------------------------------- /app/libs/pinyin4j-2.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/libs/pinyin4j-2.5.0.jar -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/deps/XposedBridgeApi-52.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/deps/XposedBridgeApi-52.jar -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /captures 8 | -------------------------------------------------------------------------------- /app/src/main/assets/donate_wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/assets/donate_wechat.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_done.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/drawable/ic_done.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_exit.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_home.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_info.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_exit.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_home.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_info.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_backup.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_default.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_restore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_restore.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_backup.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_settings.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_default.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_restore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_restore.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_settings.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_back_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_back_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/values-v19/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24dp 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_back_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_back_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_user_background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_user_background.jpg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_favorite_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_favorite_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_more_vert_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_more_vert_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_favorite_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_favorite_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_content_cut_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_content_cut_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_select_all_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_select_all_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_more_vert_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_more_vert_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_select_all_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_select_all_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_content_copy_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_content_copy_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_content_paste_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xhdpi/ic_content_paste_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_content_copy_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_content_copy_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_content_cut_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_content_cut_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_content_paste_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liubaoyua/CustomText-MD/HEAD/app/src/main/res/mipmap-xxhdpi/ic_content_paste_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0dp 4 | 4dp 5 | -------------------------------------------------------------------------------- /app/src/main/java/liubaoyua/customtext/entity/DataLoadedEvent.java: -------------------------------------------------------------------------------- 1 | package liubaoyua.customtext.entity; 2 | 3 | /** 4 | * Created by liubaoyua on 2015/8/22 0022. 5 | */ 6 | public class DataLoadedEvent { 7 | } 8 | -------------------------------------------------------------------------------- /app/app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/liubaoyua/customtext/utils/XposedUtil.java: -------------------------------------------------------------------------------- 1 | package liubaoyua.customtext.utils; 2 | 3 | /** 4 | * Created by liubaoyua on 2016/4/21. 5 | */ 6 | public class XposedUtil { 7 | 8 | public static boolean isXposedEnable() { 9 | return false; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/list_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/layout/list_fragment_app.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/fab_label_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 11 | -------------------------------------------------------------------------------- /app/src/androidTest/java/liubaoyua/customtext/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package liubaoyua.customtext; 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/res/drawable/bg_listview_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_static_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 200dp 4 | 16dp 5 | 40dp 6 | 7 | 16dp 8 | 16dp 9 | 10 | 0dp 11 | 0dp 12 | -------------------------------------------------------------------------------- /app/src/main/res/color/item_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_app_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/preference_category_widget.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 17 | 18 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_json_input.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 20 | 21 | -------------------------------------------------------------------------------- /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 | #Fri Sep 04 16:53:31 CST 2015 16 | systemProp.http.proxyHost=127.0.0.1 17 | systemProp.http.proxyPort=1080 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_app_list.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/java/liubaoyua/customtext/app/AppHelper.java: -------------------------------------------------------------------------------- 1 | package liubaoyua.customtext.app; 2 | 3 | import android.os.Environment; 4 | 5 | import java.util.List; 6 | 7 | import liubaoyua.customtext.entity.AppInfo; 8 | import liubaoyua.customtext.utils.Utils; 9 | 10 | /** 11 | * Created by liubaoyua on 2015/9/3. 12 | */ 13 | public class AppHelper { 14 | 15 | public static final String EXTERNAL_DIR = Environment 16 | .getExternalStorageDirectory().getAbsolutePath() + "/Custom Text/"; 17 | 18 | public static MyApplication getApplication() { 19 | return MyApplication.getInstance(); 20 | } 21 | 22 | public static List getAllList() { 23 | return getApplication().getAllList(); 24 | } 25 | 26 | public static void setAllList(List allList) { 27 | getApplication().setAllList(allList); 28 | } 29 | 30 | public static List getRecentList() { 31 | return Utils.getRecentList(getAllList()); 32 | } 33 | 34 | public static void terminal() { 35 | getApplication().onTerminate(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #f1f1f1 4 | #808080 5 | #B2000000 6 | 7 | #666666 8 | #216b74ff 9 | 10 | 11 | 12 | 13 | #2196F3 14 | #1976D2 15 | #FF5252 16 | #ffcdd2 17 | #CFD8DC 18 | #212121 19 | #727272 20 | #FFFFFF 21 | #B6B6B6 22 | 23 | 24 | #FFFFFFFF 25 | 26 | 27 | #EEEEEE 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 16 | 17 | 23 | 24 | 25 | 26 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_action_mode.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 13 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/java/liubaoyua/customtext/utils/PicassoTools.java: -------------------------------------------------------------------------------- 1 | package liubaoyua.customtext.utils; 2 | 3 | import android.content.Context; 4 | 5 | import com.squareup.picasso.LruCache; 6 | import com.squareup.picasso.Picasso; 7 | 8 | public abstract class PicassoTools { 9 | 10 | private static Picasso instance; 11 | private static LruCache picassoCache; 12 | 13 | public static void init(Context ctx) { 14 | if (instance == null) { 15 | Picasso.Builder builder = new Picasso.Builder(ctx); 16 | builder.addRequestHandler(new IconLoader(ctx)); 17 | picassoCache = new LruCache(ctx); 18 | builder.memoryCache(picassoCache); 19 | instance = builder.build(); 20 | } 21 | } 22 | 23 | 24 | public static synchronized Picasso getInstance() { 25 | /*if (instance == null) { 26 | Picasso.Builder builder = new Picasso.Builder(ctx); 27 | picassoCache = new LruCache(ctx); 28 | builder.memoryCache(picassoCache); 29 | instance = builder.build(); 30 | Picasso.setSingletonInstance(instance); 31 | } */ 32 | return instance; 33 | } 34 | 35 | public static void clearCache() { 36 | picassoCache.clear(); 37 | } 38 | 39 | public static void destroy() { 40 | instance.shutdown(); 41 | instance = null; 42 | picassoCache.clear(); 43 | picassoCache = null; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | android { 3 | compileSdkVersion 23 4 | buildToolsVersion "23.0.2" 5 | 6 | defaultConfig { 7 | applicationId "liubaoyua.customtext" 8 | minSdkVersion 15 9 | targetSdkVersion 22 10 | versionCode 201605011 11 | versionName "2.3.1 ԅ(¯﹃¯ԅ)" 12 | // resConfigs "nodpi", "hdpi","xxhdpi" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled true 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | 21 | dataBinding { 22 | enabled = true 23 | } 24 | 25 | 26 | lintOptions { 27 | checkReleaseBuilds false 28 | // Or, if you prefer, you can continue to check for errors in release builds, 29 | // but continue the build even when errors are found: 30 | abortOnError false 31 | } 32 | } 33 | 34 | dependencies { 35 | compile fileTree(dir: 'libs', include: ['*.jar']) 36 | provided fileTree(dir: 'deps', include: ['*.jar']) 37 | compile 'de.greenrobot:eventbus:2.4.0' 38 | compile 'com.android.support:appcompat-v7:23.3.0' 39 | compile 'com.android.support:design:23.3.0' 40 | compile 'com.squareup.picasso:picasso:2.5.2' 41 | compile 'com.android.support:cardview-v7:23.3.0' 42 | compile 'com.android.support:recyclerview-v7:23.3.0' 43 | compile 'com.rengwuxian.materialedittext:library:2.1.4' 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/res/layout/list_item_restore.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 25 | 26 |