├── settings.gradle ├── .idea ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── vcs.xml ├── modules.xml ├── libraries │ └── library_2_4_0.xml ├── runConfigurations.xml ├── compiler.xml ├── gradle.xml └── misc.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── Screenshots ├── TimelyView_Screenshot.gif └── TimelyTimeView_screenshot.gif ├── sample ├── src │ └── main │ │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── values │ │ │ ├── dimens.xml │ │ │ ├── strings.xml │ │ │ ├── arrays.xml │ │ │ └── styles.xml │ │ ├── menu │ │ │ └── main.xml │ │ ├── values-sw720dp-land │ │ │ └── dimens.xml │ │ ├── values-v11 │ │ │ └── styles.xml │ │ ├── values-w820dp │ │ │ └── dimens.xml │ │ ├── values-v14 │ │ │ └── styles.xml │ │ └── layout │ │ │ ├── activity_timely_time_view.xml │ │ │ ├── activity_main.xml │ │ │ └── activity_timely_view.xml │ │ ├── java │ │ └── com │ │ │ └── mbh │ │ │ └── timelyview │ │ │ └── sample │ │ │ ├── MainActivity.java │ │ │ ├── TimelyTimeViewActivity.java │ │ │ └── TimelyViewActivity.java │ │ └── AndroidManifest.xml ├── .gitignore └── build.gradle ├── timelyview ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── styles.xml │ │ │ └── attrs.xml │ │ └── layout │ │ │ ├── timely_shorttimeview_layout.xml │ │ │ └── timely_timeview_layout.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── mbh │ │ └── timelyview │ │ ├── model │ │ ├── core │ │ │ └── Figure.java │ │ ├── number │ │ │ ├── Null.java │ │ │ ├── One.java │ │ │ ├── Seven.java │ │ │ ├── Six.java │ │ │ ├── Two.java │ │ │ ├── Five.java │ │ │ ├── Nine.java │ │ │ ├── Zero.java │ │ │ ├── Eight.java │ │ │ ├── Four.java │ │ │ └── Three.java │ │ └── NumberUtils.java │ │ ├── animation │ │ └── TimelyEvaluator.java │ │ ├── TimelyTimeUtils.java │ │ ├── TimelyShortTimeView.java │ │ ├── TimelyTimeView.java │ │ ├── TimelyView.java │ │ └── TimelyTimeCommon.java ├── .gitignore └── build.gradle ├── proguard-project.txt ├── .gitignore ├── gradlew.bat ├── README.md ├── gradlew └── LICENSE /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':timelyview' 2 | include ':sample' -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iballan/TimelyView/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Screenshots/TimelyView_Screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iballan/TimelyView/HEAD/Screenshots/TimelyView_Screenshot.gif -------------------------------------------------------------------------------- /Screenshots/TimelyTimeView_screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iballan/TimelyView/HEAD/Screenshots/TimelyTimeView_screenshot.gif -------------------------------------------------------------------------------- /sample/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iballan/TimelyView/HEAD/sample/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iballan/TimelyView/HEAD/sample/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iballan/TimelyView/HEAD/sample/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /timelyview/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | : 4 | -------------------------------------------------------------------------------- /timelyview/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /sample/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Sep 20 17:09:14 EEST 2016 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-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /sample/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /sample/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Timely View 5 | Settings 6 | 7 | Timely View 8 | Timely Time View 9 | 10 | 11 | -------------------------------------------------------------------------------- /sample/src/main/res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 128dp 8 | 9 | 10 | -------------------------------------------------------------------------------- /sample/src/main/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sample/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /sample/src/main/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /sample/src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Pick a number 5 | 0 6 | 1 7 | 2 8 | 3 9 | 4 10 | 5 11 | 6 12 | 7 13 | 8 14 | 9 15 | 16 | -------------------------------------------------------------------------------- /timelyview/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /sample/.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # generated files 12 | bin/ 13 | gen/ 14 | 15 | # Local configuration file (sdk path, etc) 16 | local.properties 17 | gradle.properties 18 | 19 | # Eclipse project files 20 | .classpath 21 | .project 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Intellij project files 27 | *.iml 28 | *.ipr 29 | *.iws 30 | .idea/ 31 | 32 | # OSX files 33 | .DS_Store 34 | .gradle -------------------------------------------------------------------------------- /timelyview/.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # generated files 12 | bin/ 13 | gen/ 14 | 15 | # Local configuration file (sdk path, etc) 16 | local.properties 17 | gradle.properties 18 | 19 | # Eclipse project files 20 | .classpath 21 | .project 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Intellij project files 27 | *.iml 28 | *.ipr 29 | *.iws 30 | .idea/ 31 | 32 | # OSX files 33 | .DS_Store 34 | .gradle -------------------------------------------------------------------------------- /.idea/libraries/library_2_4_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /timelyview/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | dependencies { 4 | compile 'com.nineoldandroids:library:2.4.0' 5 | } 6 | 7 | android { 8 | compileSdkVersion 25 9 | buildToolsVersion "25.0.1" 10 | 11 | defaultConfig { 12 | minSdkVersion 1 13 | targetSdkVersion 25 14 | versionCode 2 15 | versionName "1.0.1" 16 | } 17 | 18 | compileOptions { 19 | sourceCompatibility JavaVersion.VERSION_1_7 20 | targetCompatibility JavaVersion.VERSION_1_7 21 | } 22 | 23 | buildTypes { 24 | release { 25 | minifyEnabled false 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /sample/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.1" 6 | 7 | defaultConfig { 8 | minSdkVersion 9 9 | targetSdkVersion 25 10 | versionCode 2 11 | versionName "1.0.1" 12 | } 13 | 14 | compileOptions { 15 | sourceCompatibility JavaVersion.VERSION_1_7 16 | targetCompatibility JavaVersion.VERSION_1_7 17 | } 18 | 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | } 23 | } 24 | } 25 | 26 | dependencies { 27 | compile project(':timelyview') 28 | compile 'com.android.support:appcompat-v7:25.0.1' 29 | } 30 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /sample/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /timelyview/src/main/java/com/mbh/timelyview/model/core/Figure.java: -------------------------------------------------------------------------------- 1 | package com.mbh.timelyview.model.core; 2 | 3 | /** 4 | * Model class for cubic bezier figure 5 | */ 6 | public abstract class Figure { 7 | private static final int NO_VALUE = -1; 8 | 9 | private int pointsCount = NO_VALUE; 10 | 11 | //A chained sequence of points P0,P1,P2,P3/0,P1,P2,P3/0,... 12 | private float[][] controlPoints = null; 13 | 14 | protected Figure(float[][] controlPoints) { 15 | this.controlPoints = controlPoints; 16 | this.pointsCount = (controlPoints.length + 2) / 3; 17 | } 18 | 19 | public int getPointsCount() { 20 | return pointsCount; 21 | } 22 | 23 | public float[][] getControlPoints() { 24 | return controlPoints; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /timelyview/src/main/java/com/mbh/timelyview/model/number/Null.java: -------------------------------------------------------------------------------- 1 | package com.mbh.timelyview.model.number; 2 | 3 | 4 | import com.mbh.timelyview.model.core.Figure; 5 | 6 | public class Null extends Figure { 7 | private static final float[][] POINTS = { 8 | {0.5f, 0.5f}, {0.5f, 0.5f}, {0.5f, 0.5f}, 9 | {0.5f, 0.5f}, {0.5f, 0.5f}, {0.5f, 0.5f}, 10 | {0.5f, 0.5f}, {0.5f, 0.5f}, {0.5f, 0.5f}, 11 | {0.5f, 0.5f}, {0.5f, 0.5f}, {0.5f, 0.5f}, 12 | {0.5f, 0.5f} 13 | }; 14 | 15 | private static final Null INSTANCE = new Null(); 16 | 17 | private Null() { 18 | super(POINTS); 19 | } 20 | 21 | public static Null getInstance() { 22 | return INSTANCE; 23 | } 24 | } -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 20 | -------------------------------------------------------------------------------- /proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /timelyview/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 | -------------------------------------------------------------------------------- /sample/src/main/java/com/mbh/timelyview/sample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.mbh.timelyview.sample; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | import android.view.Menu; 6 | import android.view.View; 7 | 8 | public class MainActivity extends AppCompatActivity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_main); 14 | } 15 | 16 | public void btn_timelyTimeViewClicked(View v){ 17 | TimelyTimeViewActivity.start(MainActivity.this); 18 | } 19 | public void btn_timelyViewClicked(View v){ 20 | TimelyViewActivity.start(MainActivity.this); 21 | } 22 | 23 | @Override 24 | public boolean onCreateOptionsMenu(Menu menu) { 25 | // Inflate the menu; this adds items to the action bar if it is present. 26 | getMenuInflater().inflate(R.menu.main, menu); 27 | return true; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /sample/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /timelyview/src/main/java/com/mbh/timelyview/model/number/One.java: -------------------------------------------------------------------------------- 1 | package com.mbh.timelyview.model.number; 2 | 3 | import com.mbh.timelyview.model.core.Figure; 4 | 5 | public class One extends Figure { 6 | private static final float[][] POINTS = { 7 | {0.425414364640884f, 0.113259668508287f}, {0.425414364640884f, 0.113259668508287f}, {0.577348066298343f, 0.113259668508287f}, 8 | {0.577348066298343f, 0.113259668508287f}, {0.577348066298343f, 0.113259668508287f}, {0.577348066298343f, 1f}, 9 | {0.577348066298343f, 1f}, {0.577348066298343f, 1f}, {0.577348066298343f, 1f}, 10 | {0.577348066298343f, 1f}, {0.577348066298343f, 1f}, {0.577348066298343f, 1f}, 11 | {0.577348066298343f, 1f} 12 | }; 13 | 14 | private static One INSTANCE = new One(); 15 | 16 | protected One() { 17 | super(POINTS); 18 | } 19 | 20 | public static One getInstance() { 21 | return INSTANCE; 22 | } 23 | } -------------------------------------------------------------------------------- /timelyview/src/main/java/com/mbh/timelyview/animation/TimelyEvaluator.java: -------------------------------------------------------------------------------- 1 | package com.mbh.timelyview.animation; 2 | 3 | import com.nineoldandroids.animation.TypeEvaluator; 4 | 5 | public class TimelyEvaluator implements TypeEvaluator { 6 | private float[][] _cachedPoints = null; 7 | 8 | @Override 9 | public float[][] evaluate(float fraction, float[][] startValue, float[][] endValue) { 10 | int pointsCount = startValue.length; 11 | initCache(pointsCount); 12 | 13 | for(int i = 0; i < pointsCount; i++) { 14 | _cachedPoints[i][0] = startValue[i][0] + fraction * (endValue[i][0] - startValue[i][0]); 15 | _cachedPoints[i][1] = startValue[i][1] + fraction * (endValue[i][1] - startValue[i][1]); 16 | } 17 | 18 | return _cachedPoints; 19 | } 20 | 21 | private void initCache(int pointsCount) { 22 | if(_cachedPoints == null || _cachedPoints.length != pointsCount) { 23 | _cachedPoints = new float[pointsCount][2]; 24 | } 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /timelyview/src/main/java/com/mbh/timelyview/model/number/Seven.java: -------------------------------------------------------------------------------- 1 | package com.mbh.timelyview.model.number; 2 | 3 | import com.mbh.timelyview.model.core.Figure; 4 | 5 | public class Seven extends Figure { 6 | private static final float[][] POINTS = { 7 | {0.259668508287293f, 0.116022099447514f}, {0.259668508287293f, 0.116022099447514f}, {0.87292817679558f, 0.116022099447514f}, 8 | {0.87292817679558f, 0.116022099447514f}, {0.87292817679558f, 0.116022099447514f}, {0.7f, 0.422099447513812f}, 9 | {0.7f, 0.422099447513812f}, {0.7f, 0.422099447513812f}, {0.477348066298343f, 0.733149171270718f}, 10 | {0.477348066298343f, 0.733149171270718f}, {0.477348066298343f, 0.733149171270718f}, {0.25414364640884f, 1f}, 11 | {0.25414364640884f, 1f} 12 | }; 13 | 14 | private static Seven INSTANCE = new Seven(); 15 | 16 | protected Seven() { 17 | super(POINTS); 18 | } 19 | 20 | public static Seven getInstance() { 21 | return INSTANCE; 22 | } 23 | } -------------------------------------------------------------------------------- /timelyview/src/main/java/com/mbh/timelyview/model/number/Six.java: -------------------------------------------------------------------------------- 1 | package com.mbh.timelyview.model.number; 2 | 3 | import com.mbh.timelyview.model.core.Figure; 4 | 5 | public class Six extends Figure { 6 | private static final float[][] POINTS = { 7 | {0.607734806629834f, 0.110497237569061f}, {0.607734806629834f, 0.110497237569061f}, {0.607734806629834f, 0.110497237569061f}, 8 | {0.607734806629834f, 0.110497237569061f}, {0.392265193370166f, 0.43646408839779f}, {0.265193370165746f, 0.50828729281768f}, 9 | {0.25414364640884f, 0.696132596685083f}, {0.287292817679558f, 1.13017127071823f}, {0.87292817679558f, 1.06077348066298f}, 10 | {0.845303867403315f, 0.696132596685083f}, {0.806629834254144f, 0.364640883977901f}, {0.419889502762431f, 0.353591160220994f}, 11 | {0.295580110497238f, 0.552486187845304f} 12 | }; 13 | 14 | private static Six INSTANCE = new Six(); 15 | 16 | protected Six() { 17 | super(POINTS); 18 | } 19 | 20 | public static Six getInstance() { 21 | return INSTANCE; 22 | } 23 | } -------------------------------------------------------------------------------- /timelyview/src/main/java/com/mbh/timelyview/model/number/Two.java: -------------------------------------------------------------------------------- 1 | package com.mbh.timelyview.model.number; 2 | 3 | import com.mbh.timelyview.model.core.Figure; 4 | 5 | public class Two extends Figure { 6 | private static final float[][] POINTS = { 7 | {0.30939226519337f, 0.331491712707182f}, {0.325966850828729f, 0.0110497237569061f}, {0.790055248618785f, 0.0220994475138122f}, 8 | {0.798342541436464f, 0.337016574585635f}, {0.798342541436464f, 0.430939226519337f}, {0.718232044198895f, 0.541436464088398f}, 9 | {0.596685082872928f, 0.674033149171271f}, {0.519337016574586f, 0.762430939226519f}, {0.408839779005525f, 0.856353591160221f}, 10 | {0.314917127071823f, 0.977900552486188f}, {0.314917127071823f, 0.977900552486188f}, {0.812154696132597f, 0.977900552486188f}, 11 | {0.812154696132597f, 0.977900552486188f} 12 | }; 13 | 14 | private static Two INSTANCE = new Two(); 15 | 16 | protected Two() { 17 | super(POINTS); 18 | } 19 | 20 | public static Two getInstance() { 21 | return INSTANCE; 22 | } 23 | } -------------------------------------------------------------------------------- /timelyview/src/main/java/com/mbh/timelyview/model/number/Five.java: -------------------------------------------------------------------------------- 1 | package com.mbh.timelyview.model.number; 2 | 3 | import com.mbh.timelyview.model.core.Figure; 4 | 5 | public class Five extends Figure { 6 | private static final float[][] POINTS = { 7 | {0.806629834254144f, 0.110497237569061f}, {0.502762430939227f, 0.110497237569061f}, {0.502762430939227f, 0.110497237569061f}, 8 | {0.502762430939227f, 0.110497237569061f}, {0.397790055248619f, 0.430939226519337f}, {0.397790055248619f, 0.430939226519337f}, 9 | {0.397790055248619f, 0.430939226519337f}, {0.535911602209945f, 0.364640883977901f}, {0.801104972375691f, 0.469613259668508f}, 10 | {0.801104972375691f, 0.712707182320442f}, {0.773480662983425f, 1.01104972375691f}, {0.375690607734807f, 1.0939226519337f}, 11 | {0.248618784530387f, 0.850828729281768f} 12 | }; 13 | 14 | private static Five INSTANCE = new Five(); 15 | 16 | protected Five() { 17 | super(POINTS); 18 | } 19 | 20 | public static Five getInstance() { 21 | return INSTANCE; 22 | } 23 | } -------------------------------------------------------------------------------- /timelyview/src/main/java/com/mbh/timelyview/model/number/Nine.java: -------------------------------------------------------------------------------- 1 | package com.mbh.timelyview.model.number; 2 | 3 | import com.mbh.timelyview.model.core.Figure; 4 | 5 | public class Nine extends Figure { 6 | private static final float[][] POINTS = { 7 | {0.80939226519337f, 0.552486187845304f}, {0.685082872928177f, 0.751381215469613f}, {0.298342541436464f, 0.740331491712707f}, 8 | {0.259668508287293f, 0.408839779005525f}, {0.232044198895028f, 0.0441988950276243f}, {0.81767955801105f, -0.0441988950276243f}, 9 | {0.850828729281768f, 0.408839779005525f}, {0.839779005524862f, 0.596685082872928f}, {0.712707182320442f, 0.668508287292818f}, 10 | {0.497237569060773f, 0.994475138121547f}, {0.497237569060773f, 0.994475138121547f}, {0.497237569060773f, 0.994475138121547f}, 11 | {0.497237569060773f, 0.994475138121547f} 12 | }; 13 | 14 | private static Nine INSTANCE = new Nine(); 15 | 16 | protected Nine() { 17 | super(POINTS); 18 | } 19 | 20 | public static Nine getInstance() { 21 | return INSTANCE; 22 | } 23 | } -------------------------------------------------------------------------------- /timelyview/src/main/java/com/mbh/timelyview/model/number/Zero.java: -------------------------------------------------------------------------------- 1 | package com.mbh.timelyview.model.number; 2 | 3 | import com.mbh.timelyview.model.core.Figure; 4 | 5 | public class Zero extends Figure { 6 | private static final float[][] POINTS = { 7 | {0.24585635359116f, 0.552486187845304f}, {0.24585635359116f, 0.331491712707182f}, {0.370165745856354f, 0.0994475138121547f}, 8 | {0.552486187845304f, 0.0994475138121547f}, {0.734806629834254f, 0.0994475138121547f}, {0.861878453038674f, 0.331491712707182f}, 9 | {0.861878453038674f, 0.552486187845304f}, {0.861878453038674f, 0.773480662983425f}, {0.734806629834254f, 0.994475138121547f}, 10 | {0.552486187845304f, 0.994475138121547f}, {0.370165745856354f, 0.994475138121547f}, {0.24585635359116f, 0.773480662983425f}, 11 | {0.24585635359116f, 0.552486187845304f} 12 | }; 13 | 14 | private static Zero INSTANCE = new Zero(); 15 | 16 | protected Zero() { 17 | super(POINTS); 18 | } 19 | 20 | public static Zero getInstance() { 21 | return INSTANCE; 22 | } 23 | } -------------------------------------------------------------------------------- /timelyview/src/main/java/com/mbh/timelyview/model/number/Eight.java: -------------------------------------------------------------------------------- 1 | package com.mbh.timelyview.model.number; 2 | 3 | import com.mbh.timelyview.model.core.Figure; 4 | 5 | public class Eight extends Figure { 6 | private static final float[][] POINTS = { 7 | {0.558011049723757f, 0.530386740331492f}, {0.243093922651934f, 0.524861878453039f}, {0.243093922651934f, 0.104972375690608f}, 8 | {0.558011049723757f, 0.104972375690608f}, {0.850828729281768f, 0.104972375690608f}, {0.850828729281768f, 0.530386740331492f}, 9 | {0.558011049723757f, 0.530386740331492f}, {0.243093922651934f, 0.530386740331492f}, {0.198895027624309f, 0.988950276243094f}, 10 | {0.558011049723757f, 0.988950276243094f}, {0.850828729281768f, 0.988950276243094f}, {0.850828729281768f, 0.530386740331492f}, 11 | {0.558011049723757f, 0.530386740331492f} 12 | }; 13 | 14 | private static Eight INSTANCE = new Eight(); 15 | 16 | protected Eight() { 17 | super(POINTS); 18 | } 19 | 20 | public static Eight getInstance() { 21 | return INSTANCE; 22 | } 23 | } -------------------------------------------------------------------------------- /timelyview/src/main/java/com/mbh/timelyview/model/number/Four.java: -------------------------------------------------------------------------------- 1 | package com.mbh.timelyview.model.number; 2 | 3 | import com.mbh.timelyview.model.core.Figure; 4 | 5 | public class Four extends Figure { 6 | private static final float[][] POINTS = { 7 | {0.856353591160221f, 0.806629834254144f}, {0.856353591160221f, 0.806629834254144f}, {0.237569060773481f, 0.806629834254144f}, 8 | {0.237569060773481f, 0.806629834254144f}, {0.237569060773481f, 0.806629834254144f}, {0.712707182320442f, 0.138121546961326f}, 9 | {0.712707182320442f, 0.138121546961326f}, {0.712707182320442f, 0.138121546961326f}, {0.712707182320442f, 0.806629834254144f}, 10 | {0.712707182320442f, 0.806629834254144f}, {0.712707182320442f, 0.806629834254144f}, {0.712707182320442f, 0.988950276243094f}, 11 | {0.712707182320442f, 0.988950276243094f} 12 | 13 | }; 14 | 15 | private static Four INSTANCE = new Four(); 16 | 17 | protected Four() { 18 | super(POINTS); 19 | } 20 | 21 | public static Four getInstance() { 22 | return INSTANCE; 23 | } 24 | } -------------------------------------------------------------------------------- /timelyview/src/main/java/com/mbh/timelyview/model/number/Three.java: -------------------------------------------------------------------------------- 1 | package com.mbh.timelyview.model.number; 2 | 3 | import com.mbh.timelyview.model.core.Figure; 4 | 5 | public class Three extends Figure { 6 | private static final float[][] POINTS = { 7 | {0.361878453038674f, 0.298342541436464f}, {0.348066298342541f, 0.149171270718232f}, {0.475138121546961f, 0.0994475138121547f}, 8 | {0.549723756906077f, 0.0994475138121547f}, {0.861878453038674f, 0.0994475138121547f}, {0.806629834254144f, 0.530386740331492f}, 9 | {0.549723756906077f, 0.530386740331492f}, {0.87292817679558f, 0.530386740331492f}, {0.828729281767956f, 0.994475138121547f}, 10 | {0.552486187845304f, 0.994475138121547f}, {0.298342541436464f, 0.994475138121547f}, {0.30939226519337f, 0.828729281767956f}, 11 | {0.312154696132597f, 0.790055248618785f} 12 | }; 13 | 14 | private static Three INSTANCE = new Three(); 15 | 16 | protected Three() { 17 | super(POINTS); 18 | } 19 | 20 | public static Three getInstance() { 21 | return INSTANCE; 22 | } 23 | } -------------------------------------------------------------------------------- /sample/src/main/res/layout/activity_timely_time_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 20 | 21 | 26 | 27 | 32 | 33 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 |