diff --git a/.gitignore b/.gitignore index 73d5b6d..468cf93 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /.idea/ /shimmerizer-annotations/ /shimmerizer-compiler/ +/app/ diff --git a/app/.gitignore b/app/.gitignore deleted file mode 100644 index 796b96d..0000000 --- a/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/app/build.gradle b/app/build.gradle deleted file mode 100644 index 47687d6..0000000 --- a/app/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -apply plugin: 'com.android.application' - -android { - compileSdkVersion 28 - defaultConfig { - applicationId "com.github.andromedcodes.demo.waves" - minSdkVersion 14 - targetSdkVersion 28 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:28.0.0-rc02' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' - - implementation project(':waves') -} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro deleted file mode 100644 index f1b4245..0000000 --- a/app/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/app/src/androidTest/java/com/github/andromedcodes/demo/waves/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/github/andromedcodes/demo/waves/ExampleInstrumentedTest.java deleted file mode 100644 index e346864..0000000 --- a/app/src/androidTest/java/com/github/andromedcodes/demo/waves/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.github.andromedcodes.demo.waves; - -import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.assertEquals; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getTargetContext(); - - assertEquals("com.github.andromedcodes.shimmerthat", appContext.getPackageName()); - } -} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml deleted file mode 100644 index 11fcc61..0000000 --- a/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/java/com/github/andromedcodes/demo/waves/MainActivity.java b/app/src/main/java/com/github/andromedcodes/demo/waves/MainActivity.java deleted file mode 100644 index 35b6356..0000000 --- a/app/src/main/java/com/github/andromedcodes/demo/waves/MainActivity.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.github.andromedcodes.demo.waves; - -import android.os.Bundle; -import android.os.Handler; -import android.support.v7.app.AppCompatActivity; -import android.widget.TextView; - -import com.github.andromedcodes.demo.R; -import com.github.andromedcodes.waves.Waves; - -//@Shimmerize(color = R.color.colorPrimary, views = {R.id.sampleImg, R.id.sampleTitle, R.id.sampleDesc}) -public class MainActivity extends AppCompatActivity { - - private TextView sampleTitle; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - sampleTitle = findViewById(R.id.sampleTitle); - - Waves.on(sampleTitle) - .on(findViewById(R.id.sampleImg)) - .on(findViewById(R.id.sampleDesc)) - .on(findViewById(R.id.sampleDesc2)) - //.leader(sampleTitle) - .stopAllAtOnce(false) - //.apply(this, R.color.colorPrimary, 1300, false); - .start(); - - Handler handler = new Handler(); - handler.postDelayed(new Runnable() { - @Override - public void run() { - sampleTitle.setText("It's working!!!"); - } - }, 2000); - } -} diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml deleted file mode 100644 index c7bd21d..0000000 --- a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml deleted file mode 100644 index d5fccc5..0000000 --- a/app/src/main/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index 5024351..0000000 --- a/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index eca70cf..0000000 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml deleted file mode 100644 index eca70cf..0000000 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index a2f5908..0000000 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 1b52399..0000000 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index ff10afd..0000000 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index 115a4c7..0000000 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index dcd3cd8..0000000 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 459ca60..0000000 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 8ca12fe..0000000 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 8e19b41..0000000 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index b824ebd..0000000 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 4c19a13..0000000 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml deleted file mode 100644 index 7cafaa0..0000000 --- a/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - #3F51B5 - #303F9F - #FF4081 - #C2C2C2 - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml deleted file mode 100644 index 0f947c0..0000000 --- a/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Waves-Demo - diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml deleted file mode 100644 index 5885930..0000000 --- a/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/app/src/test/java/com/github/andromedcodes/demo/waves/ExampleUnitTest.java b/app/src/test/java/com/github/andromedcodes/demo/waves/ExampleUnitTest.java deleted file mode 100644 index f4f2bf3..0000000 --- a/app/src/test/java/com/github/andromedcodes/demo/waves/ExampleUnitTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.github.andromedcodes.demo.waves; - -import org.junit.Test; - -import static org.junit.Assert.assertEquals; - -/** - * Example local unit test, which will execute on the development machine (host). - * - * @see Testing documentation - */ -public class ExampleUnitTest { - @Test - public void addition_isCorrect() { - assertEquals(4, 2 + 2); - } -} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index d20bc26..136fb50 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -include ':app', ':waves'//, ':shimmerizer-annotations', ':shimmerizer-compiler' +include ':waves' diff --git a/waves/src/main/java/com/github/andromedcodes/waves/Waves.java b/waves/src/main/java/com/github/andromedcodes/waves/Waves.java index bf7e496..b16bff3 100644 --- a/waves/src/main/java/com/github/andromedcodes/waves/Waves.java +++ b/waves/src/main/java/com/github/andromedcodes/waves/Waves.java @@ -77,42 +77,6 @@ public static RequestBuilder context(Context context) { return waves.requestBuilder.context(context); } - private static void instantiateWaves(T target, String suffix) { - Class targetClass = target.getClass(); - String className = targetClass.getName(); - try { - Class bindingClass = targetClass - .getClassLoader() - .loadClass(className + suffix); - Constructor classConstructor = bindingClass.getConstructor(targetClass); - try { - classConstructor.newInstance(target); - } catch (IllegalAccessException e) { - throw new RuntimeException("Unable to invoke " + classConstructor, e); - } catch (InstantiationException e) { - throw new RuntimeException("Unable to invoke " + classConstructor, e); - } catch (InvocationTargetException e) { - Throwable cause = e.getCause(); - if (cause instanceof RuntimeException) { - throw (RuntimeException) cause; - } - if (cause instanceof Error) { - throw (Error) cause; - } - throw new RuntimeException("Unable to create instance.", cause); - } - } catch (ClassNotFoundException e) { - throw new RuntimeException("Attempt to use Auto bind without shimmerizer-compiler annotation processor plugin"); - //throw new RuntimeException("Unable to find Class for " + className + suffix, e); - } catch (NoSuchMethodException e) { - throw new RuntimeException("Unable to find constructor for " + className + suffix, e); - } - } - - /*public static void standalone(T activity) { - instantiateWaves(activity, BindingSuffix.GENERATED_CLASS_SUFFIX); - }*/ - @Override public void notifyDataReady() { for (Disposable disposable : waves.requestBuilder.observerBag)