├── app ├── .gitignore ├── src │ ├── main │ │ ├── assets │ │ │ ├── Lato-Black.ttf │ │ │ ├── Lato-Bold.ttf │ │ │ ├── Lato-Light.ttf │ │ │ ├── Lato-Hairline.ttf │ │ │ ├── Lato-Italic.ttf │ │ │ ├── Lato-Regular.ttf │ │ │ ├── Screenshot 2.png │ │ │ ├── Screenshot 3.png │ │ │ ├── screenshot 1.png │ │ │ ├── Lato-BoldItalic.ttf │ │ │ ├── Lato-BlackItalic.ttf │ │ │ ├── Lato-LightItalic.ttf │ │ │ └── Lato-HairlineItalic.ttf │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── styles.xml │ │ │ │ └── colors.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 │ │ │ └── androidchils │ │ │ └── odometerlibrary │ │ │ └── MainActivity.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── androidchils │ │ │ └── odometerlibrary │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── androidchils │ │ └── odometerlibrary │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── odometer ├── .gitignore ├── src │ ├── main │ │ ├── assets │ │ │ ├── Lato-Black.ttf │ │ │ ├── Lato-Bold.ttf │ │ │ ├── Lato-Light.ttf │ │ │ ├── Lato-Hairline.ttf │ │ │ ├── Lato-Italic.ttf │ │ │ ├── Lato-Regular.ttf │ │ │ ├── Lato-BoldItalic.ttf │ │ │ ├── Lato-BlackItalic.ttf │ │ │ ├── Lato-LightItalic.ttf │ │ │ └── Lato-HairlineItalic.ttf │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── np_numberpicker_selection_divider.9.png │ │ │ │ └── gradient.xml │ │ │ ├── layout │ │ │ │ ├── number_picker.xml │ │ │ │ └── number_picker_selector_wheel.xml │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ ├── color.xml │ │ │ │ └── attrs.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── androidchils │ │ │ └── odometer │ │ │ ├── Odometer.java │ │ │ └── NumberPicker.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── androidchils │ │ │ └── odometer │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── androidchils │ │ └── odometer │ │ └── ExampleInstrumentedTest.java ├── build.gradle └── proguard-rules.pro ├── settings.gradle ├── .idea ├── copyright │ └── profiles_settings.xml ├── markdown-navigator │ └── profiles_settings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── gradle.xml ├── compiler.xml ├── misc.xml └── markdown-navigator.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── gradlew └── README.md /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /odometer/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':odometer' 2 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/assets/Lato-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/assets/Lato-Black.ttf -------------------------------------------------------------------------------- /app/src/main/assets/Lato-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/assets/Lato-Bold.ttf -------------------------------------------------------------------------------- /app/src/main/assets/Lato-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/assets/Lato-Light.ttf -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | OdometerLibrary 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/assets/Lato-Hairline.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/assets/Lato-Hairline.ttf -------------------------------------------------------------------------------- /app/src/main/assets/Lato-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/assets/Lato-Italic.ttf -------------------------------------------------------------------------------- /app/src/main/assets/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/assets/Lato-Regular.ttf -------------------------------------------------------------------------------- /app/src/main/assets/Screenshot 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/assets/Screenshot 2.png -------------------------------------------------------------------------------- /app/src/main/assets/Screenshot 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/assets/Screenshot 3.png -------------------------------------------------------------------------------- /app/src/main/assets/screenshot 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/assets/screenshot 1.png -------------------------------------------------------------------------------- /app/src/main/assets/Lato-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/assets/Lato-BoldItalic.ttf -------------------------------------------------------------------------------- /odometer/src/main/assets/Lato-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/odometer/src/main/assets/Lato-Black.ttf -------------------------------------------------------------------------------- /odometer/src/main/assets/Lato-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/odometer/src/main/assets/Lato-Bold.ttf -------------------------------------------------------------------------------- /odometer/src/main/assets/Lato-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/odometer/src/main/assets/Lato-Light.ttf -------------------------------------------------------------------------------- /app/src/main/assets/Lato-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/assets/Lato-BlackItalic.ttf -------------------------------------------------------------------------------- /app/src/main/assets/Lato-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/assets/Lato-LightItalic.ttf -------------------------------------------------------------------------------- /odometer/src/main/assets/Lato-Hairline.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/odometer/src/main/assets/Lato-Hairline.ttf -------------------------------------------------------------------------------- /odometer/src/main/assets/Lato-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/odometer/src/main/assets/Lato-Italic.ttf -------------------------------------------------------------------------------- /odometer/src/main/assets/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/odometer/src/main/assets/Lato-Regular.ttf -------------------------------------------------------------------------------- /app/src/main/assets/Lato-HairlineItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/assets/Lato-HairlineItalic.ttf -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /odometer/src/main/assets/Lato-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/odometer/src/main/assets/Lato-BoldItalic.ttf -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /odometer/src/main/assets/Lato-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/odometer/src/main/assets/Lato-BlackItalic.ttf -------------------------------------------------------------------------------- /odometer/src/main/assets/Lato-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/odometer/src/main/assets/Lato-LightItalic.ttf -------------------------------------------------------------------------------- /.idea/markdown-navigator/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /odometer/src/main/assets/Lato-HairlineItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/odometer/src/main/assets/Lato-HairlineItalic.ttf -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/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/Chils17/OdometerLibrary/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/Chils17/OdometerLibrary/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/Chils17/OdometerLibrary/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/Chils17/OdometerLibrary/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 | -------------------------------------------------------------------------------- /odometer/src/main/res/drawable/np_numberpicker_selection_divider.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chils17/OdometerLibrary/HEAD/odometer/src/main/res/drawable/np_numberpicker_selection_divider.9.png -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Jun 21 18:09:43 IST 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 | -------------------------------------------------------------------------------- /odometer/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /odometer/src/main/res/layout/number_picker.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | -------------------------------------------------------------------------------- /odometer/src/main/res/drawable/gradient.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /odometer/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Odometer 3 | Lato-Black.ttf 4 | Lato-BlackItalic.ttf 5 | Lato-Bold.ttf 6 | Lato-Hairline.ttf 7 | Lato-Light.ttf 8 | Lato-Regular.ttf 9 | 10 | -------------------------------------------------------------------------------- /odometer/src/main/res/layout/number_picker_selector_wheel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /odometer/src/test/java/com/androidchils/odometer/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.androidchils.odometer; 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/test/java/com/androidchils/odometerlibrary/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.androidchils.odometerlibrary; 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/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | 8 | #000000 9 | #ffffff 10 | 11 | #565656 12 | #e2e2e2 13 | 14 | @android:color/transparent 15 | 16 | 17 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /odometer/src/main/res/values/color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | 8 | #000000 9 | #ffffff 10 | 11 | #565656 12 | #e2e2e2 13 | 14 | 15 | #969696 16 | #000000 17 | #969696 18 | 19 | @android:color/transparent 20 | 21 | 22 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /odometer/src/androidTest/java/com/androidchils/odometer/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.androidchils.odometer; 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.androidchils.odometer.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/androidchils/odometerlibrary/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.androidchils.odometerlibrary; 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.androidchils.odometerlibrary", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /odometer/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.3" 6 | 7 | defaultConfig { 8 | minSdkVersion 15 9 | targetSdkVersion 25 10 | versionCode 1 11 | versionName "1.0" 12 | 13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 14 | 15 | } 16 | buildTypes { 17 | release { 18 | minifyEnabled false 19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 20 | } 21 | } 22 | } 23 | 24 | dependencies { 25 | compile fileTree(dir: 'libs', include: ['*.jar']) 26 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 27 | exclude group: 'com.android.support', module: 'support-annotations' 28 | }) 29 | compile 'com.android.support:appcompat-v7:25.3.1' 30 | testCompile 'junit:junit:4.12' 31 | } 32 | -------------------------------------------------------------------------------- /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:\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 | -------------------------------------------------------------------------------- /odometer/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:\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/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.3" 6 | defaultConfig { 7 | applicationId "com.androidchils.odometerlibrary" 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(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 '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 | compile project(':odometer') 31 | } 32 | -------------------------------------------------------------------------------- /odometer/src/main/res/values/attrs.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 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/androidchils/odometerlibrary/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.androidchils.odometerlibrary; 2 | 3 | import android.graphics.drawable.Drawable; 4 | import android.graphics.drawable.GradientDrawable; 5 | import android.support.v4.content.ContextCompat; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.os.Bundle; 8 | import android.view.View; 9 | import android.widget.Button; 10 | import android.widget.LinearLayout; 11 | import android.widget.TextView; 12 | 13 | import com.androidchils.odometer.Odometer; 14 | 15 | public class MainActivity extends AppCompatActivity { 16 | 17 | private Odometer odometer; 18 | private TextView tvOutPut; 19 | private Button btn_submit; 20 | 21 | @Override 22 | protected void onCreate(Bundle savedInstanceState) { 23 | super.onCreate(savedInstanceState); 24 | setContentView(R.layout.activity_main); 25 | 26 | odometer = (Odometer) findViewById(R.id.odometer); 27 | tvOutPut = (TextView) findViewById(R.id.tvOutPut); 28 | btn_submit = (Button) findViewById(R.id.btn_submit); 29 | 30 | Odometer odo = new Odometer.Builder(this) 31 | .textSize(18) 32 | .textColor(ContextCompat.getColor(this, R.color.white)) 33 | .reading("12345") 34 | .slot(5) 35 | .font(getString(R.string.lato_regular)) 36 | .background(ContextCompat.getColor(this, R.color.white), ContextCompat.getColor(this, R.color.black)) 37 | .build(); 38 | 39 | ((LinearLayout) findViewById(R.id.linear)).addView(odo); 40 | 41 | clickListener(); 42 | 43 | } 44 | 45 | 46 | private void clickListener() { 47 | 48 | btn_submit.setOnClickListener(new View.OnClickListener() { 49 | @Override 50 | public void onClick(View v) { 51 | tvOutPut.setText(odometer.getFinalOdometerValue()); 52 | } 53 | }); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /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 | 8 | 9 | 20 | 21 | 32 | 33 | 44 | 45 | 56 | 57 | 66 | 67 |