From 6838e72ab0710a831e2b49b4cc173dbe34abfe28 Mon Sep 17 00:00:00 2001 From: Marcin Zelent Date: Tue, 27 Mar 2018 18:05:44 +0200 Subject: Created project --- app/build.gradle | 32 ++++ app/proguard-rules.pro | 21 +++ .../liberavem/ExampleInstrumentedTest.kt | 24 +++ app/src/main/AndroidManifest.xml | 11 ++ .../main/java/org/marcinzelent/liberavem/Bird.java | 37 +++++ .../res/drawable-v24/ic_launcher_foreground.xml | 34 +++++ .../main/res/drawable/ic_launcher_background.xml | 170 +++++++++++++++++++++ app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../res/mipmap-anydpi-v26/ic_launcher_round.xml | 5 + app/src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3056 bytes app/src/main/res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 5024 bytes app/src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2096 bytes app/src/main/res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2858 bytes app/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4569 bytes .../main/res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 7098 bytes app/src/main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 6464 bytes .../main/res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 10676 bytes app/src/main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 9250 bytes .../main/res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 15523 bytes app/src/main/res/values/colors.xml | 6 + app/src/main/res/values/strings.xml | 3 + app/src/main/res/values/styles.xml | 11 ++ .../org/marcinzelent/liberavem/ExampleUnitTest.kt | 17 +++ 23 files changed, 376 insertions(+) create mode 100644 app/build.gradle create mode 100644 app/proguard-rules.pro create mode 100644 app/src/androidTest/java/org/marcinzelent/liberavem/ExampleInstrumentedTest.kt create mode 100644 app/src/main/AndroidManifest.xml create mode 100644 app/src/main/java/org/marcinzelent/liberavem/Bird.java create mode 100644 app/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 app/src/main/res/values/colors.xml create mode 100644 app/src/main/res/values/strings.xml create mode 100644 app/src/main/res/values/styles.xml create mode 100644 app/src/test/java/org/marcinzelent/liberavem/ExampleUnitTest.kt (limited to 'app') diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..32ed464 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,32 @@ +apply plugin: 'com.android.application' + +apply plugin: 'kotlin-android' + +apply plugin: 'kotlin-android-extensions' + +android { + compileSdkVersion 27 + defaultConfig { + applicationId "org.marcinzelent.liberavem" + minSdkVersion 15 + targetSdkVersion 27 + 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"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" + implementation 'com.android.support:appcompat-v7:27.1.0' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'com.android.support.test:runner:1.0.1' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' +} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# 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/org/marcinzelent/liberavem/ExampleInstrumentedTest.kt b/app/src/androidTest/java/org/marcinzelent/liberavem/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..4da97c0 --- /dev/null +++ b/app/src/androidTest/java/org/marcinzelent/liberavem/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package org.marcinzelent.liberavem + +import android.support.test.InstrumentationRegistry +import android.support.test.runner.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getTargetContext() + assertEquals("org.marcinzelent.liberavem", appContext.packageName) + } +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..e61cd42 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,11 @@ + + + + diff --git a/app/src/main/java/org/marcinzelent/liberavem/Bird.java b/app/src/main/java/org/marcinzelent/liberavem/Bird.java new file mode 100644 index 0000000..668059c --- /dev/null +++ b/app/src/main/java/org/marcinzelent/liberavem/Bird.java @@ -0,0 +1,37 @@ +package org.marcinzelent.liberavem; + +public class Bird { + private int Id; + private long Created; + private String NameEnglish; + private String NameDanish; + private String PhotoUrl; + + public Bird(int id, long created, String nameEnglish, String nameDanish, String photoUrl) { + Id = id; + Created = created; + NameEnglish = nameEnglish; + NameDanish = nameDanish; + PhotoUrl = photoUrl; + } + + public int getId() { + return Id; + } + + public long ge