├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── 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_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── fingerth │ │ │ └── suputils │ │ │ └── MainActivity.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── fingerth │ │ │ └── suputils │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── fingerth │ │ └── suputils │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── FingerthDialogUtilsLibrary ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── styles.xml │ │ │ ├── colors.xml │ │ │ └── attr_progressbar.xml │ │ ├── drawable-hdpi │ │ │ ├── dialog_tip.png │ │ │ ├── dialog_error.png │ │ │ └── dialog_success.png │ │ ├── drawable │ │ │ ├── selector_gray.xml │ │ │ ├── selector_green.xml │ │ │ ├── selector_tip_color.xml │ │ │ ├── selector_error_red.xml │ │ │ ├── drawable_round_green.xml │ │ │ ├── drawable_round_error_red.xml │ │ │ ├── drawable_round_green_dark.xml │ │ │ ├── drawable_round_error_red_dark.xml │ │ │ ├── drawable_round_white.xml │ │ │ ├── drawable_round_gray.xml │ │ │ ├── drawable_round_gray_dark.xml │ │ │ ├── drawable_round_tip.xml │ │ │ ├── drawable_round_white_dd.xml │ │ │ └── drawable_round_tip_dark.xml │ │ └── layout │ │ │ ├── dialog_progress_view.xml │ │ │ ├── dialog_round_progressbar_view.xml │ │ │ ├── dialog_horizontal_progressbar_view.xml │ │ │ ├── dialog_alert_view.xml │ │ │ └── dialog_confirm_alert_view.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── fingerth │ │ └── supdialogutils │ │ ├── utils │ │ └── SupDialogStaticUtils.java │ │ ├── progressbar │ │ ├── round │ │ │ └── RoundWidthNumberProgressBar.java │ │ └── horizontal │ │ │ └── HorizontalWithNumberProgressBar.java │ │ └── SYSDiaLogUtils.java ├── build.gradle └── proguard-rules.pro ├── settings.gradle ├── pic ├── pro_01.jpg ├── pro_02.jpg ├── pro_03.jpg ├── pro_04.jpg ├── pro_05.jpg ├── pro_06.jpg ├── pro_07.jpg ├── pro_08.jpg ├── pro_09.jpg └── pro_10.jpg ├── .idea ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── gradle.xml ├── compiler.xml └── misc.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── gradlew └── README.md /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':FingerthDialogUtilsLibrary' 2 | -------------------------------------------------------------------------------- /pic/pro_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/pic/pro_01.jpg -------------------------------------------------------------------------------- /pic/pro_02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/pic/pro_02.jpg -------------------------------------------------------------------------------- /pic/pro_03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/pic/pro_03.jpg -------------------------------------------------------------------------------- /pic/pro_04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/pic/pro_04.jpg -------------------------------------------------------------------------------- /pic/pro_05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/pic/pro_05.jpg -------------------------------------------------------------------------------- /pic/pro_06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/pic/pro_06.jpg -------------------------------------------------------------------------------- /pic/pro_07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/pic/pro_07.jpg -------------------------------------------------------------------------------- /pic/pro_08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/pic/pro_08.jpg -------------------------------------------------------------------------------- /pic/pro_09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/pic/pro_09.jpg -------------------------------------------------------------------------------- /pic/pro_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/pic/pro_10.jpg -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | FingerthAndroidUtils 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | FingerthDialogUtilsLibrary 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/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/fingerth/FingerthAndroidUtils/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/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/fingerth/FingerthAndroidUtils/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/fingerth/FingerthAndroidUtils/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.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 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable-hdpi/dialog_tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/FingerthDialogUtilsLibrary/src/main/res/drawable-hdpi/dialog_tip.png -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable-hdpi/dialog_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/FingerthDialogUtilsLibrary/src/main/res/drawable-hdpi/dialog_error.png -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable-hdpi/dialog_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerth/FingerthAndroidUtils/HEAD/FingerthDialogUtilsLibrary/src/main/res/drawable-hdpi/dialog_success.png -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Jul 11 14:13:41 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 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable/selector_gray.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable/selector_green.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable/selector_tip_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable/selector_error_red.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/test/java/com/fingerth/suputils/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.fingerth.suputils; 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 | } -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable/drawable_round_green.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable/drawable_round_error_red.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable/drawable_round_green_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable/drawable_round_error_red_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable/drawable_round_white.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable/drawable_round_gray.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable/drawable_round_gray_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable/drawable_round_tip.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable/drawable_round_white_dd.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/drawable/drawable_round_tip_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | apply plugin: 'com.github.dcendents.android-maven' 4 | group='com.github.fingerth' 5 | 6 | android { 7 | compileSdkVersion 25 8 | buildToolsVersion "25.0.3" 9 | 10 | defaultConfig { 11 | minSdkVersion 14 12 | targetSdkVersion 25 13 | versionCode 1 14 | versionName "1.0" 15 | 16 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 17 | 18 | } 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | } 26 | 27 | dependencies { 28 | compile fileTree(dir: 'libs', include: ['*.jar']) 29 | compile 'com.android.support:appcompat-v7:25.3.1' 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/fingerth/suputils/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.fingerth.suputils; 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.fingerth.suputils", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #000000 5 | #ff0000 6 | 7 | #00000000 8 | 9 | 10 | #FFFFFF 11 | #F8F8F8 12 | #F4F4F4 13 | #DDDDDD 14 | #EEEEEE 15 | 16 | 17 | #24292B 18 | #333333 19 | #A3A3A3 20 | #6c6c6c 21 | #636363 22 | #808080 23 | 24 | 25 | #808080 26 | 27 | #FF5252 28 | #FF2525 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\AndroidStudio\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/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.3" 6 | defaultConfig { 7 | applicationId "com.fingerth.suputils" 8 | minSdkVersion 16 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(include: ['*.jar'], dir: 'libs') 24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | compile project(':FingerthDialogUtilsLibrary') 28 | compile 'com.android.support:appcompat-v7:25.3.1' 29 | testCompile 'junit:junit:4.12' 30 | } 31 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/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:\AndroidStudio\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 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/values/attr_progressbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/layout/dialog_progress_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 19 | 23 | 24 | 31 | 32 | 43 | 44 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/java/com/fingerth/supdialogutils/utils/SupDialogStaticUtils.java: -------------------------------------------------------------------------------- 1 | package com.fingerth.supdialogutils.utils; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.util.DisplayMetrics; 6 | import android.util.TypedValue; 7 | 8 | public class SupDialogStaticUtils { 9 | 10 | public static final String TAG = "SupDialogStaticUtils"; 11 | 12 | private static int sysWidth = 0; 13 | private static int sysHeight = 0; 14 | 15 | /** 16 | * 获取手机的分比率,高和宽 17 | */ 18 | private static void getScreen(Activity activity) { 19 | if (SupDialogStaticUtils.sysWidth <= 0 || SupDialogStaticUtils.sysHeight <= 0) { 20 | DisplayMetrics dm = new DisplayMetrics(); 21 | activity.getWindowManager().getDefaultDisplay().getMetrics(dm); 22 | SupDialogStaticUtils.sysWidth = dm.widthPixels; 23 | SupDialogStaticUtils.sysHeight = dm.heightPixels; 24 | } 25 | } 26 | 27 | public static int getScreenWidth(Activity activity) { 28 | getScreen(activity); 29 | return SupDialogStaticUtils.sysWidth; 30 | } 31 | 32 | public static int getScreenHeight(Activity activity) { 33 | getScreen(activity); 34 | return SupDialogStaticUtils.sysHeight; 35 | } 36 | 37 | public static int getStatusBarHeight(Context c) { 38 | int result = 0; 39 | int resourceId = c.getResources().getIdentifier("status_bar_height", "dimen", "android"); 40 | if (resourceId > 0) { 41 | result = c.getResources().getDimensionPixelSize(resourceId); 42 | } 43 | return result; 44 | } 45 | 46 | 47 | public static int dp2px(Context context, int dp) { 48 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, context.getResources().getDisplayMetrics()); 49 | } 50 | 51 | public static int dp2px(Context context, float dp) { 52 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, context.getResources().getDisplayMetrics()); 53 | } 54 | 55 | 56 | public static int sp2px(Context context, int sp) { 57 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp, context.getResources().getDisplayMetrics()); 58 | 59 | } 60 | 61 | public static int px2dip(Context context, float pxValue) { 62 | final float scale = context.getResources().getDisplayMetrics().density; 63 | return (int) (pxValue / scale + 0.5f); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/layout/dialog_round_progressbar_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 19 | 20 | 24 | 25 | 26 | 39 | 40 | 41 | 42 | 53 | 54 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/layout/dialog_horizontal_progressbar_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 19 | 20 | 24 | 25 | 34 | 35 | 44 | 45 | 49 | 50 | 60 | 61 | 62 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/layout/dialog_alert_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 19 | 27 | 28 | 29 | 40 | 41 | 50 | 51 | 52 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /.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 | 47 | 48 | 49 | 50 | 51 | 56 | 57 | 58 | 59 | 60 | 61 | 1.8 62 | 63 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /FingerthDialogUtilsLibrary/src/main/res/layout/dialog_confirm_alert_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 19 | 27 | 28 | 29 | 42 | 43 | 54 | 55 | 59 | 60 | 64 | 65 | 79 | 80 | 84 | 85 | 99 | 100 | 104 | 105 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 |