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