├── app ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── values │ │ │ ├── styles.xml │ │ │ ├── dimens.xml │ │ │ └── strings.xml │ │ ├── values-w820dp │ │ │ └── dimens.xml │ │ └── layout │ │ │ └── activity_main.xml │ │ ├── java │ │ └── io │ │ │ └── kimo │ │ │ └── konami │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml ├── build.gradle └── proguard-rules.pro ├── library ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── drawable │ │ │ ├── a_normal.png │ │ │ ├── a_pressed.png │ │ │ ├── b_normal.png │ │ │ ├── b_pressed.png │ │ │ ├── start_normal.png │ │ │ ├── start_pressed.png │ │ │ ├── btn_selector_a.xml │ │ │ ├── btn_selector_b.xml │ │ │ └── btn_selector_start.xml │ │ ├── values │ │ │ └── strings.xml │ │ └── layout │ │ │ └── dialog_buttons.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── io │ │ └── kimo │ │ └── konamicode │ │ ├── KonamiSequenceListener.java │ │ ├── KonamiCode.java │ │ └── KonamiCodeLayout.java ├── build.gradle └── proguard-rules.pro ├── settings.gradle ├── assets ├── assets.sketch ├── konami-code-chart.jpg └── konami-code-screenshot.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── README.md ├── gradlew └── LICENSE /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':library' 2 | -------------------------------------------------------------------------------- /assets/assets.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagokimo/KonamiCode/HEAD/assets/assets.sketch -------------------------------------------------------------------------------- /assets/konami-code-chart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagokimo/KonamiCode/HEAD/assets/konami-code-chart.jpg -------------------------------------------------------------------------------- /assets/konami-code-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagokimo/KonamiCode/HEAD/assets/konami-code-screenshot.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagokimo/KonamiCode/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /library/src/main/res/drawable/a_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagokimo/KonamiCode/HEAD/library/src/main/res/drawable/a_normal.png -------------------------------------------------------------------------------- /library/src/main/res/drawable/a_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagokimo/KonamiCode/HEAD/library/src/main/res/drawable/a_pressed.png -------------------------------------------------------------------------------- /library/src/main/res/drawable/b_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagokimo/KonamiCode/HEAD/library/src/main/res/drawable/b_normal.png -------------------------------------------------------------------------------- /library/src/main/res/drawable/b_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagokimo/KonamiCode/HEAD/library/src/main/res/drawable/b_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagokimo/KonamiCode/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagokimo/KonamiCode/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagokimo/KonamiCode/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagokimo/KonamiCode/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /library/src/main/res/drawable/start_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagokimo/KonamiCode/HEAD/library/src/main/res/drawable/start_normal.png -------------------------------------------------------------------------------- /library/src/main/res/drawable/start_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagokimo/KonamiCode/HEAD/library/src/main/res/drawable/start_pressed.png -------------------------------------------------------------------------------- /library/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | KonamiCode 3 | Konami Code! 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Aug 21 22:53:25 CEST 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 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/btn_selector_a.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/btn_selector_b.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/btn_selector_start.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Konami Code Easter-Egg 3 | 4 | Swipe into the following directions:\n↑↑↓↓←→←→ 5 | Press the buttons in the order:\nB, A and START 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | /*/build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | *.iml 30 | .idea/ 31 | 32 | .DS_Store -------------------------------------------------------------------------------- /library/src/main/java/io/kimo/konamicode/KonamiSequenceListener.java: -------------------------------------------------------------------------------- 1 | package io.kimo.konamicode; 2 | 3 | /** 4 | * KonamiSequenceListener 5 | * 6 | * Listeners of sequenced actions are implemented with this contract. 7 | */ 8 | public interface KonamiSequenceListener { 9 | 10 | boolean onSwipeSequenceAchieved(); 11 | boolean validSwipeSequence(); 12 | void resetSwipeSequence(); 13 | 14 | boolean onPressedSequenceAchieved(); 15 | boolean validPressedSequence(); 16 | void resetPressedSequence(); 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/io/kimo/konami/MainActivity.java: -------------------------------------------------------------------------------- 1 | package io.kimo.konami; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | 6 | import io.kimo.konamicode.KonamiCode; 7 | 8 | 9 | public class MainActivity extends AppCompatActivity { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | setContentView(R.layout.activity_main); 15 | 16 | new KonamiCode.Installer(this) 17 | .on(this) 18 | .install(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /library/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 24 5 | buildToolsVersion "22.0.1" 6 | 7 | defaultConfig { 8 | minSdkVersion 9 9 | targetSdkVersion 24 10 | versionCode 4 11 | versionName "1.1.6" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile fileTree(include: ['*.jar'], dir: 'libs') 23 | compile 'com.android.support:support-v4:24.2.0' 24 | } 25 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 24 5 | buildToolsVersion "22.0.1" 6 | 7 | defaultConfig { 8 | applicationId "io.kimo.konami" 9 | minSdkVersion 14 10 | targetSdkVersion 24 11 | versionCode 2 12 | versionName "1.0.1" 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(dir: 'libs', include: ['*.jar']) 24 | compile 'com.android.support:appcompat-v7:24.2.0' 25 | compile project(':library') 26 | } 27 | -------------------------------------------------------------------------------- /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 /Users/Kimo/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 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /library/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 /Users/Kimo/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 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 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 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /library/src/main/res/layout/dialog_buttons.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 |