From b87c75d607956393ad3b07751eb59ccf41726863 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Wed, 11 Oct 2017 14:17:27 -0400 Subject: fix/misc (#81) * Remove jvmstatic, fixes #68 * Create HO logging * Remove double null boolean notation * Replace multi if else with when * Ignore case in setSpan, closes #82 --- about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt | 6 +++--- about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'about') diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt b/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt index 629aa52..5595aed 100644 --- a/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt +++ b/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt @@ -1,5 +1,6 @@ package ca.allanwang.kau.about +import android.annotation.SuppressLint import android.support.v7.widget.RecyclerView import android.text.method.LinkMovementMethod import android.view.View @@ -22,9 +23,7 @@ class FaqIItem(val content: FaqItem) : KauIItem>) { + fun bindEvents(fastAdapter: FastAdapter>) { fastAdapter.withSelectable(false) .withEventHook(object : ClickEventHook>() { @@ -43,6 +42,7 @@ class FaqIItem(val content: FaqItem) : KauIItem?) { super.bindView(holder, payloads) with(holder) { diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt b/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt index e50460e..88e6f9b 100644 --- a/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt +++ b/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt @@ -25,7 +25,7 @@ class LibraryIItem(val lib: Library) : KauIItem>) { + fun bindEvents(fastAdapter: FastAdapter>) { fastAdapter.withSelectable(false) .withOnClickListener { v, _, item, _ -> if (item !is LibraryIItem) false @@ -53,11 +53,11 @@ class LibraryIItem(val lib: Library) : KauIItem Date: Thu, 12 Oct 2017 11:30:40 -0400 Subject: Translations (#84) * Rename string files * Add translations to readme * Check job scheduler null check against travis lint * Remove bad spacing * Update badges * Use vector zenhub badge --- .gitignore | 1 + README.md | 10 +++++-- about/src/main/res/values/strings.xml | 5 ---- about/src/main/res/values/strings_about.xml | 23 +++------------- about/src/main/res/values/strings_about_kau.xml | 20 ++++++++++++++ colorpicker/src/main/res/values/strings.xml | 6 ----- .../src/main/res/values/strings_colorpicker.xml | 6 +++++ gradle.properties | 2 +- mediapicker/src/main/res/values/strings.xml | 14 ---------- .../src/main/res/values/strings_mediapicker.xml | 14 ++++++++++ sample/src/main/res/values/strings.xml | 31 ---------------------- sample/src/main/res/values/strings_sample.xml | 31 ++++++++++++++++++++++ 12 files changed, 85 insertions(+), 78 deletions(-) delete mode 100644 about/src/main/res/values/strings.xml create mode 100644 about/src/main/res/values/strings_about_kau.xml delete mode 100644 colorpicker/src/main/res/values/strings.xml create mode 100644 colorpicker/src/main/res/values/strings_colorpicker.xml delete mode 100644 mediapicker/src/main/res/values/strings.xml create mode 100644 mediapicker/src/main/res/values/strings_mediapicker.xml delete mode 100644 sample/src/main/res/values/strings.xml create mode 100644 sample/src/main/res/values/strings_sample.xml (limited to 'about') diff --git a/.gitignore b/.gitignore index 4ca0b81..6f35f6b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.iml /.idea .gradle +/crowdin.properties /local.properties .DS_Store /build diff --git a/README.md b/README.md index cf3215c..bc09b0f 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,9 @@ KAU is available on JitPack [![](https://jitpack.io/v/ca.allanwang/kau.svg)](https://jitpack.io/#ca.allanwang/kau) [![Build Status](https://travis-ci.org/AllanWang/KAU.svg?branch=master)](https://travis-ci.org/AllanWang/KAU) +[![Crowdin](https://d322cqt584bo4o.cloudfront.net/kotlin-android-utils/localized.svg)](https://crowdin.com/project/kotlin-android-utils) [![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin) -[![Stories in Ready](https://badge.waffle.io/AllanWang/KAU.png?label=ready&title=Ready)](https://waffle.io/AllanWang/KAU?utm_source=badge) +[![ZenHub](https://img.shields.io/badge/Shipping%20faster%20with-ZenHub-45529A.svg)](https://app.zenhub.com/workspace/o/allanwang/kau/boards) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/AllanWang/KAU/master/LICENSE) To apply, add the following to your root build.gradle: @@ -140,4 +141,9 @@ To resolve that, add `multiDexEnabled true` under your `app.gradle > android > d Likewise, it is highly recommended to use proguard to clean up your project upon release. All KAU components support proguard out of the box. -Some may have extra requirements for certain features, which will be detailed in their respective README. \ No newline at end of file +Some may have extra requirements for certain features, which will be detailed in their respective README. + +## Translations + +KAU depends on translations crowdsourced by the general public. +If you would like to contribute, please visit [here](https://crwd.in/kotlin-android-utils) diff --git a/about/src/main/res/values/strings.xml b/about/src/main/res/values/strings.xml deleted file mode 100644 index 164c0c8..0000000 --- a/about/src/main/res/values/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - This app would not be possible without the following great libraries. - FAQ - \ No newline at end of file diff --git a/about/src/main/res/values/strings_about.xml b/about/src/main/res/values/strings_about.xml index 592f9f4..164c0c8 100644 --- a/about/src/main/res/values/strings_about.xml +++ b/about/src/main/res/values/strings_about.xml @@ -1,20 +1,5 @@ - - - Allan Wang - https://www.allanwang.ca/dev/ - @string/kau_version_code - KAU - -
- KAU aims to make many common functions executable in one line. It adds numerous extensions to match Kotlin\'s DSL, - and supports completely customizable view groups that are usable in any app project. - ]]> -
- https://allanwang.github.io/KAU/ - true - https://github.com/AllanWang/KAU - ca.allanwang.kau - apache_2_0 + + + This app would not be possible without the following great libraries. + FAQ \ No newline at end of file diff --git a/about/src/main/res/values/strings_about_kau.xml b/about/src/main/res/values/strings_about_kau.xml new file mode 100644 index 0000000..592f9f4 --- /dev/null +++ b/about/src/main/res/values/strings_about_kau.xml @@ -0,0 +1,20 @@ + + + Allan Wang + https://www.allanwang.ca/dev/ + @string/kau_version_code + KAU + +
+ KAU aims to make many common functions executable in one line. It adds numerous extensions to match Kotlin\'s DSL, + and supports completely customizable view groups that are usable in any app project. + ]]> +
+ https://allanwang.github.io/KAU/ + true + https://github.com/AllanWang/KAU + ca.allanwang.kau + apache_2_0 +
\ No newline at end of file diff --git a/colorpicker/src/main/res/values/strings.xml b/colorpicker/src/main/res/values/strings.xml deleted file mode 100644 index 5a6f89b..0000000 --- a/colorpicker/src/main/res/values/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Color Palette - Custom - Presets - diff --git a/colorpicker/src/main/res/values/strings_colorpicker.xml b/colorpicker/src/main/res/values/strings_colorpicker.xml new file mode 100644 index 0000000..5a6f89b --- /dev/null +++ b/colorpicker/src/main/res/values/strings_colorpicker.xml @@ -0,0 +1,6 @@ + + + Color Palette + Custom + Presets + diff --git a/gradle.properties b/gradle.properties index 4e690c7..9a45266 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,7 +25,7 @@ ANDROID_SUPPORT_LIBS=26.1.0 VERSION_NAME=3.4.3 -KOTLIN=1.1.4-3 +KOTLIN=1.1.51 ABOUT_LIBRARIES=5.9.7 ANKO=0.10.1 BLURRY=2.1.1 diff --git a/mediapicker/src/main/res/values/strings.xml b/mediapicker/src/main/res/values/strings.xml deleted file mode 100644 index 717e12b..0000000 --- a/mediapicker/src/main/res/values/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - No items found - No items have been selected - Blurrable ImageView - No items loaded - - No camera found - Please install a camera app and try again. - - Failed to create a temporary file. - - Select Media - \ No newline at end of file diff --git a/mediapicker/src/main/res/values/strings_mediapicker.xml b/mediapicker/src/main/res/values/strings_mediapicker.xml new file mode 100644 index 0000000..717e12b --- /dev/null +++ b/mediapicker/src/main/res/values/strings_mediapicker.xml @@ -0,0 +1,14 @@ + + + No items found + No items have been selected + Blurrable ImageView + No items loaded + + No camera found + Please install a camera app and try again. + + Failed to create a temporary file. + + Select Media + \ No newline at end of file diff --git a/sample/src/main/res/values/strings.xml b/sample/src/main/res/values/strings.xml deleted file mode 100644 index 1e3361e..0000000 --- a/sample/src/main/res/values/strings.xml +++ /dev/null @@ -1,31 +0,0 @@ - - KAU - This is a header - This is a description - Checkbox 1 - Checkbox 2 - Checkbox 3 - I am dependent on checkbox 2 - Text Color - Accent Color - Background Color - This selector allows custom colors - This selector does not allow custom colors - This selector allows for custom colors with alpha values - Text Pref - Saves the text - Seekbar - Time Pref - AM PM version - 24h version - Sub Item Pref - Press this to view the next subset of preferences - your.email@here.com - Your subject - Swipe Showcase - Image Showcase - Video Overlay Showcase - Adapter Showcase - KAU (Kotlin Android Utils) is a collection of common extension functions and complex UIs that can be used in almost all apps. It is meant to implement the shared components, so you can focus on what makes your app unique. - Long Prefs - diff --git a/sample/src/main/res/values/strings_sample.xml b/sample/src/main/res/values/strings_sample.xml new file mode 100644 index 0000000..1e3361e --- /dev/null +++ b/sample/src/main/res/values/strings_sample.xml @@ -0,0 +1,31 @@ + + KAU + This is a header + This is a description + Checkbox 1 + Checkbox 2 + Checkbox 3 + I am dependent on checkbox 2 + Text Color + Accent Color + Background Color + This selector allows custom colors + This selector does not allow custom colors + This selector allows for custom colors with alpha values + Text Pref + Saves the text + Seekbar + Time Pref + AM PM version + 24h version + Sub Item Pref + Press this to view the next subset of preferences + your.email@here.com + Your subject + Swipe Showcase + Image Showcase + Video Overlay Showcase + Adapter Showcase + KAU (Kotlin Android Utils) is a collection of common extension functions and complex UIs that can be used in almost all apps. It is meant to implement the shared components, so you can focus on what makes your app unique. + Long Prefs + -- cgit v1.2.3