From 81518f74fa76b6c2274a0e02ad4169f5d7f61e59 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 8 Oct 2018 01:06:44 -0400 Subject: Update translations (#169) * New translations strings_about.xml (Polish) * New translations strings_commons.xml (Hebrew) * New translations strings_commons.xml (Tagalog) * New translations strings_commons.xml (Swedish) * New translations strings_commons.xml (Serbian (Cyrillic)) * New translations strings_commons.xml (Russian) * New translations strings_commons.xml (Romanian) * New translations strings_commons.xml (Portuguese, Brazilian) * New translations strings_commons.xml (Portuguese) * New translations strings_commons.xml (Norwegian) * New translations strings_commons.xml (Korean) * New translations strings_commons.xml (Japanese) * New translations strings_commons.xml (Italian) * New translations strings_commons.xml (Hungarian) * New translations strings_commons.xml (Greek) * New translations strings_commons.xml (German) * New translations strings_commons.xml (Galician) * New translations strings_commons.xml (French) * New translations strings_commons.xml (Finnish) * New translations strings_commons.xml (English) * New translations strings_commons.xml (Dutch) * New translations strings_commons.xml (Czech) * New translations strings_commons.xml (Chinese Traditional) * New translations strings_commons.xml (Chinese Simplified) * New translations strings_commons.xml (Catalan) * New translations strings_commons.xml (Arabic) * New translations strings_commons.xml (Afrikaans) * New translations strings_colorpicker.xml (Ukrainian) * New translations strings_commons.xml (Ukrainian) * New translations strings_mediapicker.xml (Ukrainian) * New translations strings_mediapicker.xml (Tagalog) * New translations strings_mediapicker.xml (Swedish) * New translations strings_mediapicker.xml (Serbian (Cyrillic)) * New translations strings_mediapicker.xml (Russian) * New translations strings_mediapicker.xml (Romanian) * New translations strings_mediapicker.xml (Portuguese, Brazilian) * New translations strings_mediapicker.xml (Portuguese) * New translations strings_mediapicker.xml (Norwegian) * New translations strings_mediapicker.xml (Korean) * New translations strings_mediapicker.xml (Japanese) * New translations strings_mediapicker.xml (Italian) * New translations strings_mediapicker.xml (Hungarian) * New translations strings_commons.xml (Vietnamese) * New translations strings_mediapicker.xml (Hebrew) * New translations strings_mediapicker.xml (Greek) * New translations strings_mediapicker.xml (German) * New translations strings_mediapicker.xml (Galician) * New translations strings_mediapicker.xml (French) * New translations strings_mediapicker.xml (Finnish) * New translations strings_mediapicker.xml (English) * New translations strings_mediapicker.xml (Dutch) * New translations strings_mediapicker.xml (Czech) * New translations strings_mediapicker.xml (Chinese Traditional) * New translations strings_mediapicker.xml (Chinese Simplified) * New translations strings_mediapicker.xml (Catalan) * New translations strings_mediapicker.xml (Arabic) * New translations strings_mediapicker.xml (Afrikaans) * New translations strings_colorpicker.xml (Tagalog) * New translations strings_mediapicker.xml (Polish) * New translations strings_about.xml (English) * New translations strings_about.xml (Portuguese, Brazilian) * New translations strings_about.xml (Portuguese) * New translations strings_about.xml (Norwegian) * New translations strings_about.xml (Korean) * New translations strings_about.xml (Japanese) * New translations strings_about.xml (Italian) * New translations strings_about.xml (Hungarian) * New translations strings_about.xml (Hebrew) * New translations strings_about.xml (Greek) * New translations strings_about.xml (German) * New translations strings_about.xml (Galician) * New translations strings_about.xml (French) * New translations strings_about.xml (Finnish) * New translations strings_about.xml (Dutch) * New translations strings_about.xml (Russian) * New translations strings_about.xml (Czech) * New translations strings_about.xml (Chinese Simplified) * New translations strings_about.xml (Catalan) * New translations strings_about.xml (Arabic) * New translations strings_about.xml (Afrikaans) * New translations strings_mediapicker.xml (Danish) * New translations strings_commons.xml (Danish) * New translations strings_colorpicker.xml (Danish) * New translations strings_about.xml (Danish) * New translations strings_mediapicker.xml (Spanish) * New translations strings_commons.xml (Spanish) * New translations strings_about.xml (Spanish) * New translations strings_about.xml (Chinese Traditional) * New translations strings_about.xml (Romanian) * New translations strings_about.xml (Serbian (Cyrillic)) * New translations strings_colorpicker.xml (Swedish) * New translations strings_colorpicker.xml (Serbian (Cyrillic)) * New translations strings_colorpicker.xml (Russian) * New translations strings_colorpicker.xml (Romanian) * New translations strings_colorpicker.xml (Portuguese) * New translations strings_colorpicker.xml (Japanese) * New translations strings_colorpicker.xml (Hebrew) * New translations strings_colorpicker.xml (Greek) * New translations strings_about.xml (Swedish) * New translations strings_colorpicker.xml (Arabic) * New translations strings_about.xml (Tagalog) * New translations strings_about.xml (Ukrainian) * New translations strings_about.xml (Vietnamese) * New translations strings_colorpicker.xml (Afrikaans) * New translations strings_colorpicker.xml (Catalan) * New translations strings_colorpicker.xml (Chinese Traditional) * New translations strings_colorpicker.xml (Czech) * New translations strings_colorpicker.xml (Dutch) * New translations strings_colorpicker.xml (English) * New translations strings_colorpicker.xml (Finnish) * New translations strings_mediapicker.xml (Vietnamese) * New translations strings_commons.xml (Danish) * New translations strings_about.xml (Swedish) * New translations strings_about.xml (Ukrainian) * New translations strings_colorpicker.xml (Swedish) * New translations strings_colorpicker.xml (Ukrainian) * New translations strings_commons.xml (Swedish) * New translations strings_commons.xml (Ukrainian) * New translations strings_mediapicker.xml (Swedish) * New translations strings_mediapicker.xml (Ukrainian) * Delete empty files * Optimize all source files --- .../kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt | 3 ++- .../src/main/kotlin/ca/allanwang/kau/animators/KauAnimator.kt | 9 +++------ adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt | 1 + adapter/src/main/res-public/values/public.xml | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) (limited to 'adapter') diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt index c3a1c61..870861d 100644 --- a/adapter/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt +++ b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt @@ -172,7 +172,8 @@ class ThemableIItemDelegate : ThemableIItem, ThemableIItemColors by ThemableIIte @RequiresApi(Build.VERSION_CODES.LOLLIPOP) override fun bindBackgroundRipple(vararg views: View?) { val background = backgroundColor ?: return - val foreground = accentColor ?: textColor ?: backgroundColor ?: return //default to normal background + val foreground = accentColor ?: textColor ?: backgroundColor + ?: return //default to normal background val ripple = createSimpleRippleDrawable(foreground, background) views.forEach { it?.background = ripple } } diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/animators/KauAnimator.kt b/adapter/src/main/kotlin/ca/allanwang/kau/animators/KauAnimator.kt index 9e52aac..7b9b732 100644 --- a/adapter/src/main/kotlin/ca/allanwang/kau/animators/KauAnimator.kt +++ b/adapter/src/main/kotlin/ca/allanwang/kau/animators/KauAnimator.kt @@ -14,8 +14,7 @@ open class KauAnimator( val changeAnimator: KauAnimatorChange = FadeAnimatorChange() ) : BaseItemAnimator() { - open fun startDelay(holder: RecyclerView.ViewHolder, duration: Long, factor: Float) - = Math.max(0L, (holder.adapterPosition * duration * factor).toLong()) + open fun startDelay(holder: RecyclerView.ViewHolder, duration: Long, factor: Float) = Math.max(0L, (holder.adapterPosition * duration * factor).toLong()) override fun removeAnimation(holder: RecyclerView.ViewHolder): ViewPropertyAnimator { return holder.itemView.animate().apply { @@ -30,8 +29,7 @@ open class KauAnimator( holder.itemView.apply { removeAnimator.animationCleanup(holder)() } } - override fun getRemoveDelay(remove: Long, move: Long, change: Long): Long - = removeAnimator.getDelay(remove, move, change) + override fun getRemoveDelay(remove: Long, move: Long, change: Long): Long = removeAnimator.getDelay(remove, move, change) override fun addAnimationPrepare(holder: RecyclerView.ViewHolder) { holder.itemView.apply { addAnimator.animationPrepare(holder)() } @@ -50,8 +48,7 @@ open class KauAnimator( holder.itemView.apply { addAnimator.animationCleanup(holder)() } } - override fun getAddDelay(remove: Long, move: Long, change: Long): Long - = addAnimator.getDelay(remove, move, change) + override fun getAddDelay(remove: Long, move: Long, change: Long): Long = addAnimator.getDelay(remove, move, change) override fun changeOldAnimation(holder: RecyclerView.ViewHolder, changeInfo: ChangeInfo): ViewPropertyAnimator { return holder.itemView.animate().apply { diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt index 196959c..5174503 100644 --- a/adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt +++ b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt @@ -21,6 +21,7 @@ open class KauIItem( ) : AbstractItem() where Item : IItem<*, *>, Item : IClickable<*> { @SuppressLint("ResourceType") final override fun getType(): Int = type + final override fun getViewHolder(v: View): VH = viewHolder(v) final override fun getLayoutRes(): Int = layoutRes } \ No newline at end of file diff --git a/adapter/src/main/res-public/values/public.xml b/adapter/src/main/res-public/values/public.xml index cf14680..4d16c2a 100644 --- a/adapter/src/main/res-public/values/public.xml +++ b/adapter/src/main/res-public/values/public.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file -- cgit v1.2.3 From 2ed21b32c9e77da5f957cfbf9d73a0a563b8511c Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 8 Oct 2018 03:14:40 -0400 Subject: Enhancement/public xml (#171) * Test gitignore with public xml * Fix spacing --- .gitignore | 1 + about/src/main/res-public/values/public.xml | 4 - adapter/src/main/res-public/values/public.xml | 4 - artifacts.gradle | 8 +- colorpicker/src/main/res-public/values/public.xml | 4 - core-ui/src/main/res-public/values/public.xml | 10 -- core/src/main/res-public/values/public.xml | 118 --------------------- .../src/main/res-public/values/public.xml | 19 ---- mediapicker/src/main/res-public/values/public.xml | 7 -- searchview/src/main/res-public/values/public.xml | 4 - 10 files changed, 7 insertions(+), 172 deletions(-) delete mode 100644 about/src/main/res-public/values/public.xml delete mode 100644 adapter/src/main/res-public/values/public.xml delete mode 100644 colorpicker/src/main/res-public/values/public.xml delete mode 100644 core-ui/src/main/res-public/values/public.xml delete mode 100644 core/src/main/res-public/values/public.xml delete mode 100644 kpref-activity/src/main/res-public/values/public.xml delete mode 100644 mediapicker/src/main/res-public/values/public.xml delete mode 100644 searchview/src/main/res-public/values/public.xml (limited to 'adapter') diff --git a/.gitignore b/.gitignore index 6f35f6b..d741202 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /build /captures .externalNativeBuild +**/public.xml \ No newline at end of file diff --git a/about/src/main/res-public/values/public.xml b/about/src/main/res-public/values/public.xml deleted file mode 100644 index 3739dd1..0000000 --- a/about/src/main/res-public/values/public.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/adapter/src/main/res-public/values/public.xml b/adapter/src/main/res-public/values/public.xml deleted file mode 100644 index 4d16c2a..0000000 --- a/adapter/src/main/res-public/values/public.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/artifacts.gradle b/artifacts.gradle index 12dd3fa..c0c344a 100644 --- a/artifacts.gradle +++ b/artifacts.gradle @@ -31,6 +31,8 @@ artifacts { // We assume resources within res-public are public task generatepublicxml { + println "Generating public XML" + def resDir = project.projectDir.absolutePath + "/src/main/res-public" def publicFolder = file(resDir + "/values") @@ -64,7 +66,7 @@ task generatepublicxml { ) { // Leave file comment destXmlMkp.yield "\r\n" - destXmlMkp.comment("AUTO-GENERATED FILE. DO NOT MODIFY. public.xml is generated by the generatepublicxml gradle task") + destXmlMkp.comment("AUTO-GENERATED FILE. DO NOT MODIFY. public.xml is generated by the generatepublicxml gradle task") if (tree.isEmpty()) "public"("name": "dummy", "type": "id") @@ -96,4 +98,6 @@ task generatepublicxml { } } } -} \ No newline at end of file +} + +build.dependsOn generatepublicxml \ No newline at end of file diff --git a/colorpicker/src/main/res-public/values/public.xml b/colorpicker/src/main/res-public/values/public.xml deleted file mode 100644 index 4d16c2a..0000000 --- a/colorpicker/src/main/res-public/values/public.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/core-ui/src/main/res-public/values/public.xml b/core-ui/src/main/res-public/values/public.xml deleted file mode 100644 index 3d0b8d2..0000000 --- a/core-ui/src/main/res-public/values/public.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/core/src/main/res-public/values/public.xml b/core/src/main/res-public/values/public.xml deleted file mode 100644 index 485be78..0000000 --- a/core/src/main/res-public/values/public.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/kpref-activity/src/main/res-public/values/public.xml b/kpref-activity/src/main/res-public/values/public.xml deleted file mode 100644 index bd4f615..0000000 --- a/kpref-activity/src/main/res-public/values/public.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mediapicker/src/main/res-public/values/public.xml b/mediapicker/src/main/res-public/values/public.xml deleted file mode 100644 index cadfa07..0000000 --- a/mediapicker/src/main/res-public/values/public.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/searchview/src/main/res-public/values/public.xml b/searchview/src/main/res-public/values/public.xml deleted file mode 100644 index 4d16c2a..0000000 --- a/searchview/src/main/res-public/values/public.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file -- cgit v1.2.3