Skip to content

Commit 39aa7fb

Browse files
committed
Used a more material-like spinner animation
1 parent c5796a1 commit 39aa7fb

12 files changed

Lines changed: 792 additions & 54 deletions

File tree

.idea/gradle.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The default toasts are ugly and don't really provide much more than a short mess
1313
#### Gradle
1414
```groovy
1515
dependencies {
16-
compile 'net.steamcrafted:load-toast:1.0.9'
16+
compile 'net.steamcrafted:load-toast:1.0.10'
1717
}
1818
```
1919

app/app.iml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</configuration>
2727
</facet>
2828
</component>
29-
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
29+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
3030
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
3131
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
3232
<exclude-output />
@@ -65,36 +65,31 @@
6565
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
6666
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
6767
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
68-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
6968
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
70-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
7169
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
7270
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
73-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
7471
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/jars" />
7572
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.1/jars" />
7673
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
77-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
78-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
79-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
8074
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
8175
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
82-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
76+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/mockable-android-22.jar" />
8377
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
84-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
8578
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
79+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/resources" />
8680
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
8781
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
82+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/tmp" />
8883
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
8984
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
9085
<excludeFolder url="file://$MODULE_DIR$/build/test-results" />
9186
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
9287
</content>
9388
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
9489
<orderEntry type="sourceFolder" forTests="false" />
95-
<orderEntry type="library" exported="" name="library-2.4.0" level="project" />
9690
<orderEntry type="library" exported="" name="support-v4-22.2.1" level="project" />
9791
<orderEntry type="library" exported="" name="support-annotations-22.2.1" level="project" />
92+
<orderEntry type="library" exported="" name="library-2.4.0" level="project" />
9893
<orderEntry type="library" exported="" name="appcompat-v7-22.2.1" level="project" />
9994
<orderEntry type="module" module-name="loadtoast" exported="" />
10095
</component>

app/build.gradle

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ android {
88
abortOnError false
99
}
1010

11-
12-
compileOptions {
13-
sourceCompatibility JavaVersion.VERSION_1_6
14-
targetCompatibility JavaVersion.VERSION_1_6
15-
}
16-
1711
defaultConfig {
1812
applicationId "net.steamcrafted.gesturetrackerlib"
1913
minSdkVersion 8

app/src/main/java/net/steamcrafted/loadtoastlib/MainActivity.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
import android.support.v7.app.AppCompatActivity;
99
import android.view.View;
1010
import android.view.ViewGroup;
11+
import android.widget.ImageView;
1112

1213
import net.steamcrafted.loadtoast.LoadToast;
14+
import net.steamcrafted.loadtoast.MaterialProgressDrawable;
1315

1416

1517
public class MainActivity extends AppCompatActivity {
@@ -22,13 +24,13 @@ public void onCreate(Bundle savedInstanceState) {
2224
setContentView(R.layout.activity_main);
2325

2426
final String text = "";
25-
final LoadToast lt = new LoadToast(this).setText(text).setTranslationY(100).show();
27+
final LoadToast lt = new LoadToast(this).setProgressColor(Color.RED).setText(text).setTranslationY(100).show();
2628
//lt.success();
2729
final ViewGroup root = (ViewGroup) findViewById(android.R.id.content);
2830

2931
View v = new View(this);
3032
v.setBackgroundColor(Color.RED);
31-
root.addView(v, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 400));
33+
//root.addView(v, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 400));
3234
findViewById(R.id.show).setOnClickListener(new View.OnClickListener() {
3335
@Override
3436
public void onClick(View view) {
@@ -51,9 +53,12 @@ public void onClick(View view) {
5153
@Override
5254
public void onClick(View view) {
5355
View v = new View(MainActivity.this);
54-
v.setBackgroundColor(Color.rgb((int)(Math.random() * 255), (int)(Math.random() * 255), (int)(Math.random() * 255)));
55-
root.addView(v, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 400));
56+
v.setBackgroundColor(Color.rgb((int) (Math.random() * 255), (int) (Math.random() * 255), (int) (Math.random() * 255)));
57+
//root.addView(v, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 400));
5658
}
5759
});
60+
61+
ImageView progressView = ((ImageView) findViewById(R.id.progressdrawable));
62+
MaterialProgressDrawable drawable = new MaterialProgressDrawable(this, progressView);
5863
}
5964
}

app/src/main/res/layout/activity_main.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity"
77
android:id="@+id/main_root">
88

9+
<ImageView
10+
android:layout_width="match_parent"
11+
android:layout_height="72dp"
12+
android:id="@+id/progressdrawable"/>
13+
914
<Button
1015
android:layout_width="wrap_content"
1116
android:layout_height="wrap_content"

app/src/main/res/values/styles.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<!-- Base application theme. -->
44
<style name="AppTheme" parent="Theme.AppCompat.Light">
55
<item name="android:colorAccent">@color/color_accent</item>
6+
<item name="colorAccent">@color/color_accent</item>
67
<!-- Customize your theme here. -->
78
</style>
89

gestureTrackerLib.iml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</configuration>
99
</facet>
1010
</component>
11-
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="true">
11+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
1212
<exclude-output />
1313
<content url="file://$MODULE_DIR$">
1414
<excludeFolder url="file://$MODULE_DIR$/.gradle" />

loadtoast/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ apply plugin: 'com.android.library'
33
ext {
44
PUBLISH_GROUP_ID = 'net.steamcrafted'
55
PUBLISH_ARTIFACT_ID = 'load-toast'
6-
PUBLISH_VERSION = '1.0.9'
6+
PUBLISH_VERSION = '1.0.10'
77
}
88

99
android {
10-
compileSdkVersion 22
10+
compileSdkVersion 23
1111
buildToolsVersion "22.0.1"
1212

1313
defaultConfig {
1414
minSdkVersion 8
15-
targetSdkVersion 22
15+
targetSdkVersion 23
1616
versionCode 1
1717
versionName "1.0"
1818
}

loadtoast/loadtoast.iml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,31 +69,26 @@
6969
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
7070
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
7171
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
72-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
7372
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
74-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
75-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
7673
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
77-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
78-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
79-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
8074
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
8175
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
82-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
83-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
84-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
76+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/mockable-android-23.jar" />
8577
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
78+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/resources" />
8679
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
8780
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
81+
<excludeFolder url="file://$MODULE_DIR$/build/ivy.xml" />
8882
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
8983
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
9084
<excludeFolder url="file://$MODULE_DIR$/build/poms" />
9185
<excludeFolder url="file://$MODULE_DIR$/build/release" />
86+
<excludeFolder url="file://$MODULE_DIR$/build/release-1.0.10.zip" />
9287
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
9388
<excludeFolder url="file://$MODULE_DIR$/build/test-results" />
9489
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
9590
</content>
96-
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
91+
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
9792
<orderEntry type="sourceFolder" forTests="false" />
9893
<orderEntry type="library" exported="" name="library-2.4.0" level="project" />
9994
</component>

0 commit comments

Comments
 (0)