From ccba419a8ee0bcb39e8ffefd2da7c816ace6c282 Mon Sep 17 00:00:00 2001 From: Vishnu Rajeevan Date: Fri, 17 Apr 2015 00:01:44 -0400 Subject: [PATCH] add readme --- README.md | 10 ++++++++++ app/src/main/kotlin/io/dwak/meh/model/Theme.kt | 8 ++------ meh.properties.example | 1 + 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 README.md create mode 100644 meh.properties.example diff --git a/README.md b/README.md new file mode 100644 index 0000000..d56cbb2 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +#KotMeh + +This application was written as a test application for using [Kotlin](kotlinlang.org) and [Anko](https://github.com/JetBrains/anko) in an MVP architecture alongside varous Java libraries. +The application uses [meh.com](meh.com)'s api for it's data source. + +I've tried to utilize various Kotlin features that I found to be pretty useful. +You'll see examples of delegated properties, anko UI design, expression body syntax, as well as Java interoperations. + +To use this in Android Studio, you're going to need to install the Kotlin [plugin](https://plugins.jetbrains.com/plugin/6954?pr=idea) as well as the Kotlin Extensions [plugin](https://plugins.jetbrains.com/plugin/7717?pr=idea). + diff --git a/app/src/main/kotlin/io/dwak/meh/model/Theme.kt b/app/src/main/kotlin/io/dwak/meh/model/Theme.kt index 90bc9ee..b81b90d 100644 --- a/app/src/main/kotlin/io/dwak/meh/model/Theme.kt +++ b/app/src/main/kotlin/io/dwak/meh/model/Theme.kt @@ -24,12 +24,8 @@ class Theme( return accentColorDrawable } - fun getParsedAccentColor() : Int { - return Color.parseColor(accentColor) - } + fun getParsedAccentColor() : Int = Color.parseColor(accentColor) - fun getParsedBackgroundColor() : Int { - return Color.parseColor(backgroundColor) - } + fun getParsedBackgroundColor() : Int = Color.parseColor(backgroundColor) } \ No newline at end of file diff --git a/meh.properties.example b/meh.properties.example new file mode 100644 index 0000000..07d1108 --- /dev/null +++ b/meh.properties.example @@ -0,0 +1 @@ +api_key="srrgvNoUiZzL4xj0mZy7Cahv6ndH-SyD" \ No newline at end of file