├── app ├── .gitignore ├── src │ └── main │ │ ├── ic_launcher-web.png │ │ ├── res │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── ic_launcher_foreground.png │ │ ├── values │ │ │ ├── ic_launcher_background.xml │ │ │ ├── colors.xml │ │ │ ├── styles.xml │ │ │ └── strings.xml │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── drawable │ │ │ └── splash_screen.xml │ │ └── layout │ │ │ ├── activity_demo.xml │ │ │ └── activity_lorem_loading.xml │ │ ├── java │ │ └── com │ │ │ └── davidmedenjak │ │ │ └── sample │ │ │ ├── NoSplashActivity.java │ │ │ ├── App.java │ │ │ ├── DemoActivity.java │ │ │ └── SplashActivity.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── library ├── .gitignore ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── davidmedenjak │ │ └── magikarp │ │ ├── ThemeLifecycleCallback.java │ │ ├── RevealCallback.java │ │ ├── SplashView.java │ │ └── Magikarp.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── readme └── splash.gif ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .idea ├── markdown-navigator │ └── profiles_settings.xml ├── google-java-format.xml ├── encodings.xml ├── misc.xml ├── runConfigurations.xml └── gradle.xml ├── .gitignore ├── LICENSE ├── gradle.properties ├── .travis.yml ├── gradlew.bat ├── gradlew └── README.md /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':library' 2 | -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /readme/splash.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bleeding182/magikarp/HEAD/readme/splash.gif -------------------------------------------------------------------------------- /app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bleeding182/magikarp/HEAD/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bleeding182/magikarp/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bleeding182/magikarp/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bleeding182/magikarp/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bleeding182/magikarp/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bleeding182/magikarp/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bleeding182/magikarp/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bleeding182/magikarp/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/bleeding182/magikarp/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/bleeding182/magikarp/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/bleeding182/magikarp/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/bleeding182/magikarp/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bleeding182/magikarp/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bleeding182/magikarp/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bleeding182/magikarp/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bleeding182/magikarp/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bleeding182/magikarp/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F85A6 4 | -------------------------------------------------------------------------------- /.idea/markdown-navigator/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/google-java-format.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F85A6 4 | #306680 5 | #F66218 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed May 01 09:51:59 CEST 2019 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-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/davidmedenjak/sample/NoSplashActivity.java: -------------------------------------------------------------------------------- 1 | package com.davidmedenjak.sample; 2 | 3 | /** 4 | * Dummy activity so that we can apply a different theme in the manifest without using the {@code 5 | * windowBackground} method. 6 | */ 7 | public class NoSplashActivity extends SplashActivity {} 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | /.idea/vcs.xml 11 | /.idea/dictionaries 12 | .DS_Store 13 | /build 14 | /captures 15 | .externalNativeBuild 16 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/davidmedenjak/sample/App.java: -------------------------------------------------------------------------------- 1 | package com.davidmedenjak.sample; 2 | 3 | import android.app.Application; 4 | 5 | import com.davidmedenjak.magikarp.Magikarp; 6 | 7 | public class App extends Application { 8 | 9 | @Override 10 | public void onCreate() { 11 | super.onCreate(); 12 | 13 | Magikarp.addSplashScreen(this, R.style.AppTheme); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /library/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 22 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | defaultConfig { 6 | applicationId "com.davidmedenjak.magikarp.sample" 7 | minSdkVersion 18 8 | targetSdkVersion 28 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | compileOptions { 20 | sourceCompatibility = '1.8' 21 | targetCompatibility = '1.8' 22 | } 23 | } 24 | 25 | dependencies { 26 | implementation fileTree(dir: 'libs', include: ['*.jar']) 27 | implementation 'androidx.appcompat:appcompat:1.0.2' 28 | 29 | implementation project(":library") 30 | testImplementation 'junit:junit:4.12' 31 | androidTestImplementation 'androidx.test:runner:1.1.1' 32 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 33 | } 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 David Medenjak 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/davidmedenjak/sample/DemoActivity.java: -------------------------------------------------------------------------------- 1 | package com.davidmedenjak.sample; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.os.Bundle; 6 | 7 | import androidx.annotation.Nullable; 8 | 9 | /** Activity to launch and showcase the different modes of splash screens available. */ 10 | public class DemoActivity extends Activity { 11 | 12 | @Override 13 | protected void onCreate(@Nullable Bundle savedInstanceState) { 14 | super.onCreate(savedInstanceState); 15 | 16 | setContentView(R.layout.activity_demo); 17 | 18 | findViewById(R.id.action_no_splash) 19 | .setOnClickListener(v -> startActivity(new Intent(this, NoSplashActivity.class))); 20 | findViewById(R.id.action_background_splash) 21 | .setOnClickListener(v -> startActivity(SplashActivity.newIntent(this, false, false))); 22 | findViewById(R.id.action_magikarp) 23 | .setOnClickListener(v -> startActivity(SplashActivity.newIntent(this, true, false))); 24 | findViewById(R.id.action_magikarp_animated) 25 | .setOnClickListener(v -> startActivity(SplashActivity.newIntent(this, true, true))); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Magikarp 3 | 4 | Magikarp Demo 5 | Lorem Ipsum 6 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 7 | 8 | Magikarp icon from: https://github.com/PokeAPI/sprites 9 | Magikarp (Animated) 10 | Magikarp 11 | Background splash 12 | No splash! 13 | Available splash screen types 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 30 | 34 | 35 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: android 2 | jdk: oraclejdk8 3 | android: 4 | components: 5 | - tools 6 | - build-tools-28.0.3 7 | - android-28 8 | - extra-google-google_play_services 9 | - extra-google-m2repository 10 | - extra-android-m2repository 11 | install: true 12 | before_script: 13 | - touch local.properties 14 | script: "./gradlew build test" 15 | before_cache: 16 | - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock 17 | - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ 18 | cache: 19 | directories: 20 | - "$HOME/.gradle/caches/" 21 | - "$HOME/.gradle/wrapper/" 22 | - "$HOME/.android/build-cache" 23 | deploy: 24 | - provider: releases 25 | api_key: 26 | secure: nYZAnnuzxoR7n9MgJuql8fnxfm3MmjlBWxeQtNWtWkJeZNBFoKmvsDb1con083AMG5nD7gN8+0f9ouobgI8HzfbyuzdMsLSLsY1C+Z8hyDLNcnuhzf/SE9KtF5CqBGLl5Exebb/7gECqLNtwd2f7+VrS2O3ly8oemO0SD4FOobbYq04wVXTPuzbIrWuPFHAPkQzmzj+y0Jxl/YrMujU94OmXWZbTo7alnqN6RNzRBCm04do+70muWMQwJCTTvDTVWqYbHwyiZZbTt/rkAjRGlyqVoFUITkXLJ6iJNMRv9T4rCDgBXTxfLXVgsquro9GGobDDEf4lTmCTJAoNba8aKif4wsQn8UL24Ppd67uuCz/1UMC9KfOJFf911M7zeLBpLxUn159xPkMDAIjUq5IzdXTvZvgeUP+Vy7A1tKjxyHhx9Iz0AJcUFaHMdQblSMzfIOFibaNu5wuSGVV0yJyFu66a3c16qrt8IPlWYd27JPMOIPFaGEEWr5ndMXQghCa92Gj7EJndU8SGaZl0yGxTu2JmI9qhhcQtYEi+epGTE249AtmKqyV8j+6K7iko0Fm/U8DdePBPntXaqxPx7K8xWGhxHf5fwroYIHTAskavFpmPJeohkCYiUHXaOCrkxiKJsiVTmRy7PiZeT3wrt5fx6sJq6FBTPcacQO9rjHi6Mac= 27 | file: apk 28 | skip_cleanup: true 29 | on: 30 | repo: bleeding182/magikarp 31 | tags: true 32 | - provider: script 33 | script: "./gradlew bintrayUpload" 34 | skip_cleanup: true 35 | on: 36 | tags: true 37 | env: 38 | global: 39 | secure: OQ7ik210d5Wq8fPxsR+svLl3bFvpgT1dORws98TIgqLQO2Ppzh7tPL7rSsxItgH8GX655zxBjSSfaQbZNtjV2a8zjRY6y+K9I0F0ZxlVgVhEsSA4GiGKZO7+FuSKhlwTVZ6Wa7KTSW9jObv2wfugnwFMW/xDN7kBYh05i0pvsrKYH55PYMZcUmby0I97mJ9Ktq7zTJpNTXh+AKmCpvdk4MEB5kcfDUJharCw/+MORlG21ss1VYyFVFx0weBtO3LigGRFB+oqUN7x/fwYa0egqqiUzNv7E2krQ9WsvHD6yeGt8QRYfTMTELhpMwG/jjIaaq/IHIO+xfKbPzIeG2gbF5oOl+j5Jrvohj6U2YvTV59I9Y4GKdVdQ+/QEK0LricuuwmppmYt749FqBeTWMK3FnWHBeds8R98bBlFz2KnCV0Mvb/J58Xm0vMYmtyqM+16PAtzXl+HUYBcNoir0LpdyC+Y4B4q2baUj87S0QFIuR9s4YI8I754xxRsZcU6Oay3O0zEL6zbhmOZQsS3FLERM/ElXJlAY1WbQkp6w67qYoeqjL9eZWDpVP/mSh45vokcW496Ow15givuBikl+OBqP2j7APGeM+eE06u3oCQ65Dkb7O1WYyLJKeDD17YG2jyt0qJwmptygVfcKATgalkma3/5mcuUMHERNR9HmsZID5Y= 40 | -------------------------------------------------------------------------------- /library/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.jfrog.bintray" version "1.8.1" 3 | } 4 | apply plugin: 'com.android.library' 5 | apply plugin: 'com.github.dcendents.android-maven' 6 | 7 | android { 8 | compileSdkVersion 28 9 | 10 | 11 | defaultConfig { 12 | minSdkVersion 18 13 | targetSdkVersion 28 14 | versionCode 1 15 | versionName "1.0" 16 | 17 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 18 | 19 | } 20 | 21 | buildTypes { 22 | release { 23 | minifyEnabled false 24 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 25 | } 26 | } 27 | compileOptions { 28 | sourceCompatibility = '1.8' 29 | targetCompatibility = '1.8' 30 | } 31 | 32 | } 33 | 34 | group = 'com.davidmedenjak.magikarp' 35 | version = System.getenv('TRAVIS_TAG') 36 | 37 | bintray { 38 | user = 'bleeding182' 39 | key = System.getenv('BINTRAY_KEY') 40 | 41 | pkg { 42 | repo = 'bleeding182' 43 | name = 'magikarp' 44 | licenses = ['MIT'] 45 | vcsUrl = 'https://github.com/bleeding182/magikarp' 46 | version { 47 | name = project.version 48 | desc = '' 49 | vcsTag = System.getenv('TRAVIS_TAG') 50 | } 51 | } 52 | configurations = ['archives'] 53 | } 54 | 55 | task generateSourcesJar(type: Jar) { 56 | from android.sourceSets.main.java.srcDirs 57 | classifier 'sources' 58 | } 59 | 60 | task generateJavadocs(type: Javadoc) { 61 | source = android.sourceSets.main.java.srcDirs 62 | classpath += project.files(android.getBootClasspath() 63 | .join(File.pathSeparator)) 64 | } 65 | 66 | task generateJavadocsJar(type: Jar) { 67 | from generateJavadocs.destinationDir 68 | classifier 'javadoc' 69 | } 70 | 71 | artifacts { 72 | archives generateSourcesJar, generateJavadocsJar 73 | } 74 | 75 | android { 76 | lintOptions { 77 | abortOnError false 78 | } 79 | } 80 | 81 | dependencies { 82 | implementation fileTree(dir: 'libs', include: ['*.jar']) 83 | 84 | implementation 'androidx.appcompat:appcompat:1.0.2' 85 | testImplementation 'junit:junit:4.12' 86 | androidTestImplementation 'androidx.test:runner:1.1.1' 87 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 88 | } 89 | -------------------------------------------------------------------------------- /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 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 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 Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_demo.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 22 | 23 |