aboutsummaryrefslogtreecommitdiff
path: root/about
diff options
context:
space:
mode:
Diffstat (limited to 'about')
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt31
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/AboutBinder.kt21
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/AboutPanelDelegate.kt66
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/CollapsibleTextView.kt23
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt22
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt41
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt47
-rw-r--r--about/src/main/res/layout/kau_about_section_libraries.xml6
-rw-r--r--about/src/main/res/layout/kau_about_section_main.xml8
-rw-r--r--about/src/main/res/layout/kau_activity_about.xml2
-rw-r--r--about/src/main/res/layout/kau_iitem_library.xml8
-rw-r--r--about/src/main/res/values-da-rDK/strings_about.xml3
-rw-r--r--about/src/main/res/values-de-rDE/strings_about.xml3
-rw-r--r--about/src/main/res/values-es-rES/strings_about.xml3
-rw-r--r--about/src/main/res/values-fr-rFR/strings_about.xml3
-rw-r--r--about/src/main/res/values-gl-rES/strings_about.xml3
-rw-r--r--about/src/main/res/values-hu-rHU/strings_about.xml3
-rw-r--r--about/src/main/res/values-in-rID/strings_about.xml3
-rw-r--r--about/src/main/res/values-it-rIT/strings_about.xml3
-rw-r--r--about/src/main/res/values-ko-rKR/strings_about.xml3
-rw-r--r--about/src/main/res/values-nl-rNL/strings_about.xml6
-rw-r--r--about/src/main/res/values-no-rNO/strings_about.xml3
-rw-r--r--about/src/main/res/values-pl-rPL/strings_about.xml3
-rw-r--r--about/src/main/res/values-pt-rBR/strings_about.xml3
-rw-r--r--about/src/main/res/values-pt-rPT/strings_about.xml6
-rw-r--r--about/src/main/res/values-sr-rSP/strings_about.xml6
-rw-r--r--about/src/main/res/values-sv-rSE/strings_about.xml3
-rw-r--r--about/src/main/res/values-th-rTH/strings_about.xml3
-rw-r--r--about/src/main/res/values-tr-rTR/strings_about.xml3
-rw-r--r--about/src/main/res/values-uk-rUA/strings_about.xml3
-rw-r--r--about/src/main/res/values-vi-rVN/strings_about.xml3
-rw-r--r--about/src/main/res/values-zh-rCN/strings_about.xml3
-rw-r--r--about/src/main/res/values-zh-rTW/strings_about.xml6
33 files changed, 259 insertions, 94 deletions
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt b/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
index f4ee4c5..79077c5 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
@@ -1,13 +1,28 @@
+/*
+ * Copyright 2018 Allan Wang
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package ca.allanwang.kau.about
import android.graphics.drawable.Drawable
import android.os.Bundle
-import android.support.v4.view.PagerAdapter
-import android.support.v4.view.ViewPager
import android.transition.TransitionInflater
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import androidx.viewpager.widget.PagerAdapter
+import androidx.viewpager.widget.ViewPager
import ca.allanwang.kau.adapters.FastItemThemedAdapter
import ca.allanwang.kau.adapters.ThemableIItemColors
import ca.allanwang.kau.adapters.ThemableIItemColorsDelegate
@@ -32,7 +47,8 @@ import kotlinx.android.synthetic.main.kau_activity_about.*
* Note that for the auto detection to work, the R fields must be excluded from Proguard
* Manual lib listings and other extra modifications can be done so by overriding the open functions
*/
-abstract class AboutActivityBase(val rClass: Class<*>?, private val configBuilder: Configs.() -> Unit = {}) : KauBaseActivity(), ViewPager.OnPageChangeListener {
+abstract class AboutActivityBase(val rClass: Class<*>?, private val configBuilder: Configs.() -> Unit = {}) :
+ KauBaseActivity(), ViewPager.OnPageChangeListener {
val currentPage: Int
get() = about_pager.currentItem
@@ -73,7 +89,7 @@ abstract class AboutActivityBase(val rClass: Class<*>?, private val configBuilde
about_draggable_frame.addListener(object : ElasticDragDismissFrameLayout.SystemChromeFader(this) {
override fun onDragDismissed() {
window.returnTransition = TransitionInflater.from(this@AboutActivityBase)
- .inflateTransition(if (about_draggable_frame.translationY > 0) R.transition.kau_exit_slide_bottom else R.transition.kau_exit_slide_top)
+ .inflateTransition(if (about_draggable_frame.translationY > 0) R.transition.kau_exit_slide_bottom else R.transition.kau_exit_slide_top)
panels[currentPage].recycler?.stopScroll()
finishAfterTransition()
}
@@ -113,7 +129,6 @@ abstract class AboutActivityBase(val rClass: Class<*>?, private val configBuilde
* Feel free to add your own items to the adapter in here
*/
open fun postInflateMainPage(adapter: FastItemThemedAdapter<IItem<*, *>>) {
-
}
/**
@@ -123,7 +138,7 @@ abstract class AboutActivityBase(val rClass: Class<*>?, private val configBuilde
* This is fetched asynchronously and you may override it to customize the list
*/
open fun getLibraries(libs: Libs): List<Library> =
- libs.prepareLibraries(this, null, null, true, true, true)!!
+ libs.prepareLibraries(this, null, null, true, true, true)!!
/*
* -------------------------------------------------------------------
@@ -156,7 +171,7 @@ abstract class AboutActivityBase(val rClass: Class<*>?, private val configBuilde
*/
private fun getPage(position: Int, parent: ViewGroup): View {
if (views[position] == null) views[position] = panels[position]
- .inflatePage(this@AboutActivityBase, parent, position)
+ .inflatePage(this@AboutActivityBase, parent, position)
return views[position]!!
}
}
@@ -174,4 +189,4 @@ abstract class AboutActivityBase(val rClass: Class<*>?, private val configBuilde
AnimHolder.decelerateInterpolator.invalidate() //clear the reference to the interpolators we've used
super.onDestroy()
}
-} \ No newline at end of file
+}
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/AboutBinder.kt b/about/src/main/kotlin/ca/allanwang/kau/about/AboutBinder.kt
index c99f7c2..1183113 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/AboutBinder.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/AboutBinder.kt
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2018 Allan Wang
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package ca.allanwang.kau.about
import android.content.Context
@@ -12,6 +27,6 @@ import ca.allanwang.kau.utils.withSceneTransitionAnimation
* About activity launcher
*/
inline fun <reified T : AboutActivityBase> Context.kauLaunchAbout() =
- startActivity<T>(bundleBuilder = {
- withSceneTransitionAnimation(this@kauLaunchAbout)
- }) \ No newline at end of file
+ startActivity<T>(bundleBuilder = {
+ withSceneTransitionAnimation(this@kauLaunchAbout)
+ })
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/AboutPanelDelegate.kt b/about/src/main/kotlin/ca/allanwang/kau/about/AboutPanelDelegate.kt
index b6ea16b..924a771 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/AboutPanelDelegate.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/AboutPanelDelegate.kt
@@ -1,20 +1,43 @@
+/*
+ * Copyright 2018 Allan Wang
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package ca.allanwang.kau.about
-import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import androidx.recyclerview.widget.RecyclerView
import ca.allanwang.kau.adapters.FastItemThemedAdapter
import ca.allanwang.kau.animators.FadeScaleAnimatorAdd
import ca.allanwang.kau.animators.KauAnimator
import ca.allanwang.kau.animators.NoAnimatorChange
import ca.allanwang.kau.iitems.HeaderIItem
-import ca.allanwang.kau.utils.*
+import ca.allanwang.kau.utils.AnimHolder
+import ca.allanwang.kau.utils.KAU_BOTTOM
+import ca.allanwang.kau.utils.colorToForeground
+import ca.allanwang.kau.utils.drawable
+import ca.allanwang.kau.utils.fullLinearRecycler
+import ca.allanwang.kau.utils.postDelayed
+import ca.allanwang.kau.utils.string
+import ca.allanwang.kau.utils.withMarginDecoration
import ca.allanwang.kau.xml.kauParseFaq
import com.mikepenz.aboutlibraries.Libs
import com.mikepenz.fastadapter.IItem
-import org.jetbrains.anko.doAsync
-import org.jetbrains.anko.uiThread
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.withContext
/**
* Created by Allan Wang on 2017-08-02.
@@ -76,8 +99,8 @@ abstract class AboutPanelRecycler : AboutPanelContract {
override fun onInflatingPage(activity: AboutActivityBase, recycler: RecyclerView, position: Int) {
recycler.adapter = adapter
recycler.itemAnimator = KauAnimator(
- addAnimator = FadeScaleAnimatorAdd(scaleFactor = 0.7f, itemDelayFactor = 0.2f),
- changeAnimator = NoAnimatorChange()
+ addAnimator = FadeScaleAnimatorAdd(scaleFactor = 0.7f, itemDelayFactor = 0.2f),
+ changeAnimator = NoAnimatorChange()
).apply { addDuration = 300; interpolator = AnimHolder.decelerateInterpolator(recycler.context) }
}
@@ -136,7 +159,6 @@ open class AboutPanelMain : AboutPanelRecycler() {
}
override fun addItemsImpl(activity: AboutActivityBase, position: Int) {}
-
}
/**
@@ -153,12 +175,16 @@ open class AboutPanelLibs : AboutPanelRecycler() {
}
override fun loadItems(activity: AboutActivityBase, position: Int) {
- doAsync {
- with(activity) {
- items = getLibraries(if (rClass == null) Libs(activity) else Libs(this, Libs.toStringArray(rClass.fields)))
- .map(::LibraryIItem)
+ with(activity) {
+ launch {
+ items = withContext(Dispatchers.Default) {
+ getLibraries(
+ if (rClass == null) Libs(activity)
+ else Libs(activity, Libs.toStringArray(rClass.fields))
+ ).map(::LibraryIItem)
+ }
if (pageStatus[position] == 1)
- uiThread { addItems(activity, position) }
+ addItems(activity, position)
}
}
}
@@ -166,7 +192,7 @@ open class AboutPanelLibs : AboutPanelRecycler() {
override fun addItemsImpl(activity: AboutActivityBase, position: Int) {
with(activity.configs) {
adapter.add(HeaderIItem(text = libPageTitle, textRes = libPageTitleRes))
- .add(items)
+ .add(items)
}
}
}
@@ -180,8 +206,13 @@ open class AboutPanelFaqs : AboutPanelRecycler() {
override fun loadItems(activity: AboutActivityBase, position: Int) {
with(activity) {
- kauParseFaq(configs.faqXmlRes, configs.faqParseNewLine) {
- items = it.map(::FaqIItem)
+ launch {
+ items = withContext(Dispatchers.IO) {
+ kauParseFaq(
+ configs.faqXmlRes,
+ configs.faqParseNewLine
+ )
+ }.map(::FaqIItem)
if (pageStatus[position] == 1)
addItems(activity, position)
}
@@ -191,8 +222,7 @@ open class AboutPanelFaqs : AboutPanelRecycler() {
override fun addItemsImpl(activity: AboutActivityBase, position: Int) {
with(activity.configs) {
adapter.add(HeaderIItem(text = faqPageTitle, textRes = faqPageTitleRes))
- .add(items)
+ .add(items)
}
}
-
-} \ No newline at end of file
+}
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/CollapsibleTextView.kt b/about/src/main/kotlin/ca/allanwang/kau/about/CollapsibleTextView.kt
index f010321..c9b8b93 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/CollapsibleTextView.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/CollapsibleTextView.kt
@@ -1,9 +1,24 @@
+/*
+ * Copyright 2018 Allan Wang
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package ca.allanwang.kau.about
import android.content.Context
import android.content.res.Configuration
-import android.support.v7.widget.AppCompatTextView
import android.util.AttributeSet
+import androidx.appcompat.widget.AppCompatTextView
import ca.allanwang.kau.ui.views.CollapsibleView
import ca.allanwang.kau.ui.views.CollapsibleViewDelegate
@@ -12,7 +27,9 @@ import ca.allanwang.kau.ui.views.CollapsibleViewDelegate
*
*/
class CollapsibleTextView @JvmOverloads constructor(
- context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
+ context: Context,
+ attrs: AttributeSet? = null,
+ defStyleAttr: Int = 0
) : AppCompatTextView(context, attrs, defStyleAttr), CollapsibleView by CollapsibleViewDelegate() {
init {
@@ -29,4 +46,4 @@ class CollapsibleTextView @JvmOverloads constructor(
val result = getCollapsibleDimension()
setMeasuredDimension(result.first, result.second)
}
-} \ No newline at end of file
+}
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt b/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt
index 37c13d8..b51c9c8 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt
@@ -1,7 +1,22 @@
+/*
+ * Copyright 2018 Allan Wang
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package ca.allanwang.kau.about
-import android.support.v7.widget.RecyclerView
import android.view.View
+import androidx.recyclerview.widget.RecyclerView
import ca.allanwang.kau.adapters.ThemableIItem
import ca.allanwang.kau.adapters.ThemableIItemDelegate
import ca.allanwang.kau.iitems.KauIItem
@@ -13,7 +28,7 @@ import ca.allanwang.kau.ui.views.CutoutView
* Just a cutout item with some defaults in [R.layout.kau_iitem_cutout]
*/
class CutoutIItem(val config: CutoutView.() -> Unit = {}) : KauIItem<CutoutIItem, CutoutIItem.ViewHolder>(
- R.layout.kau_iitem_cutout, ::ViewHolder, R.id.kau_item_cutout
+ R.layout.kau_iitem_cutout, ::ViewHolder, R.id.kau_item_cutout
), ThemableIItem by ThemableIItemDelegate() {
override fun isSelectable(): Boolean = false
@@ -37,5 +52,4 @@ class CutoutIItem(val config: CutoutView.() -> Unit = {}) : KauIItem<CutoutIItem
class ViewHolder(v: View) : RecyclerView.ViewHolder(v) {
val cutout: CutoutView = v.findViewById(R.id.kau_cutout)
}
-
-} \ No newline at end of file
+}
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 5cf046e..755ac81 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt
@@ -1,11 +1,26 @@
+/*
+ * Copyright 2018 Allan Wang
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package ca.allanwang.kau.about
import android.annotation.SuppressLint
-import android.support.v7.widget.RecyclerView
import android.text.method.LinkMovementMethod
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
+import androidx.recyclerview.widget.RecyclerView
import ca.allanwang.kau.adapters.ThemableIItem
import ca.allanwang.kau.adapters.ThemableIItemDelegate
import ca.allanwang.kau.iitems.KauIItem
@@ -22,23 +37,24 @@ import com.mikepenz.fastadapter.listeners.ClickEventHook
* Created by Allan Wang on 2017-08-02.
*/
class FaqIItem(val content: FaqItem) : KauIItem<LibraryIItem, FaqIItem.ViewHolder>(
- R.layout.kau_iitem_faq, ::ViewHolder, R.id.kau_item_faq
+ R.layout.kau_iitem_faq, ::ViewHolder, R.id.kau_item_faq
), ThemableIItem by ThemableIItemDelegate() {
companion object {
fun bindEvents(fastAdapter: FastAdapter<IItem<*, *>>) {
fastAdapter.withSelectable(false)
- .withEventHook(object : ClickEventHook<IItem<*, *>>() {
-
- override fun onBind(viewHolder: RecyclerView.ViewHolder): View? = (viewHolder as? ViewHolder)?.questionContainer
+ .withEventHook(object : ClickEventHook<IItem<*, *>>() {
- override fun onClick(v: View, position: Int, adapter: FastAdapter<IItem<*, *>>, item: IItem<*, *>) {
- if (item !is FaqIItem) return
- item.isExpanded = !item.isExpanded
- v.parentViewGroup.findViewById<CollapsibleTextView>(R.id.faq_item_answer).setExpanded(item.isExpanded)
- }
+ override fun onBind(viewHolder: RecyclerView.ViewHolder): View? =
+ (viewHolder as? ViewHolder)?.questionContainer
- })
+ override fun onClick(v: View, position: Int, adapter: FastAdapter<IItem<*, *>>, item: IItem<*, *>) {
+ if (item !is FaqIItem) return
+ item.isExpanded = !item.isExpanded
+ v.parentViewGroup.findViewById<CollapsibleTextView>(R.id.faq_item_answer)
+ .setExpanded(item.isExpanded)
+ }
+ })
}
}
@@ -83,5 +99,4 @@ class FaqIItem(val content: FaqItem) : KauIItem<LibraryIItem, FaqIItem.ViewHolde
answer.movementMethod = LinkMovementMethod.getInstance()
}
}
-
-} \ No newline at end of file
+}
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 2749c28..33aac09 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt
@@ -1,11 +1,26 @@
+/*
+ * Copyright 2018 Allan Wang
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package ca.allanwang.kau.about
import android.os.Build
-import android.support.v7.widget.CardView
-import android.support.v7.widget.RecyclerView
import android.text.Html
import android.view.View
import android.widget.TextView
+import androidx.cardview.widget.CardView
+import androidx.recyclerview.widget.RecyclerView
import ca.allanwang.kau.adapters.ThemableIItem
import ca.allanwang.kau.adapters.ThemableIItemDelegate
import ca.allanwang.kau.iitems.KauIItem
@@ -20,21 +35,21 @@ import com.mikepenz.fastadapter.IItem
* Created by Allan Wang on 2017-06-27.
*/
class LibraryIItem(val lib: Library) : KauIItem<LibraryIItem, LibraryIItem.ViewHolder>(
- R.layout.kau_iitem_library, ::ViewHolder, R.id.kau_item_library
+ R.layout.kau_iitem_library, ::ViewHolder, R.id.kau_item_library
), ThemableIItem by ThemableIItemDelegate() {
companion object {
fun bindEvents(fastAdapter: FastAdapter<IItem<*, *>>) {
fastAdapter.withSelectable(false)
- .withOnClickListener { v, _, item, _ ->
- if (item !is LibraryIItem)
- false
- else
- with(item.lib) {
- v!!.context.startLink(libraryWebsite, repositoryLink, authorWebsite)
- true
- }
- }
+ .withOnClickListener { v, _, item, _ ->
+ if (item !is LibraryIItem)
+ false
+ else
+ with(item.lib) {
+ v!!.context.startLink(libraryWebsite, repositoryLink, authorWebsite)
+ true
+ }
+ }
}
}
@@ -48,7 +63,10 @@ class LibraryIItem(val lib: Library) : KauIItem<LibraryIItem, LibraryIItem.ViewH
@Suppress("DEPRECATION")
description.text = when {
lib.libraryDescription.isBlank() -> lib.libraryDescription
- Build.VERSION.SDK_INT >= Build.VERSION_CODES.N -> Html.fromHtml(lib.libraryDescription, Html.FROM_HTML_MODE_LEGACY)
+ Build.VERSION.SDK_INT >= Build.VERSION_CODES.N -> Html.fromHtml(
+ lib.libraryDescription,
+ Html.FROM_HTML_MODE_LEGACY
+ )
else -> Html.fromHtml(lib.libraryDescription)
}
bottomDivider.gone()
@@ -90,5 +108,4 @@ class LibraryIItem(val lib: Library) : KauIItem<LibraryIItem, LibraryIItem.ViewH
val divider: View = v.findViewById(R.id.lib_item_top_divider)
val bottomDivider: View = v.findViewById(R.id.lib_item_bottom_divider)
}
-
-} \ No newline at end of file
+}
diff --git a/about/src/main/res/layout/kau_about_section_libraries.xml b/about/src/main/res/layout/kau_about_section_libraries.xml
index c14225e..60d1312 100644
--- a/about/src/main/res/layout/kau_about_section_libraries.xml
+++ b/about/src/main/res/layout/kau_about_section_libraries.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/about_library_container"
android:layout_width="match_parent"
@@ -15,7 +15,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
- <android.support.v7.widget.RecyclerView
+ <androidx.recyclerview.widget.RecyclerView
android:id="@+id/about_library_recycler"
android:layout_width="0dp"
android:layout_height="0dp"
@@ -24,4 +24,4 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/about_library_title" />
-</android.support.constraint.ConstraintLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/about/src/main/res/layout/kau_about_section_main.xml b/about/src/main/res/layout/kau_about_section_main.xml
index e7b83a0..7ea0415 100644
--- a/about/src/main/res/layout/kau_about_section_main.xml
+++ b/about/src/main/res/layout/kau_about_section_main.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
-<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:showIn="@layout/kau_activity_about">
- <android.support.constraint.ConstraintLayout
+ <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/about_main_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@@ -41,6 +41,6 @@
</FrameLayout>
- </android.support.constraint.ConstraintLayout>
+ </androidx.constraintlayout.widget.ConstraintLayout>
-</android.support.v4.widget.NestedScrollView>
+</androidx.core.widget.NestedScrollView>
diff --git a/about/src/main/res/layout/kau_activity_about.xml b/about/src/main/res/layout/kau_activity_about.xml
index 3d1f9ab..626adda 100644
--- a/about/src/main/res/layout/kau_activity_about.xml
+++ b/about/src/main/res/layout/kau_activity_about.xml
@@ -9,7 +9,7 @@
app:dragDismissScale="0.95"
tools:context=".ui.about.AboutActivityBase">
- <android.support.v4.view.ViewPager
+ <androidx.viewpager.widget.ViewPager
android:id="@+id/about_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
diff --git a/about/src/main/res/layout/kau_iitem_library.xml b/about/src/main/res/layout/kau_iitem_library.xml
index 47b4e01..4dd5155 100644
--- a/about/src/main/res/layout/kau_iitem_library.xml
+++ b/about/src/main/res/layout/kau_iitem_library.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/lib_item_card"
@@ -8,7 +8,7 @@
android:clickable="true"
android:focusable="true">
- <android.support.constraint.ConstraintLayout
+ <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/kau_padding_normal"
@@ -112,6 +112,6 @@
app:layout_constraintTop_toBottomOf="@id/lib_item_bottom_divider"
tools:text="License" />
- </android.support.constraint.ConstraintLayout>
+ </androidx.constraintlayout.widget.ConstraintLayout>
-</android.support.v7.widget.CardView> \ No newline at end of file
+</androidx.cardview.widget.CardView> \ No newline at end of file
diff --git a/about/src/main/res/values-da-rDK/strings_about.xml b/about/src/main/res/values-da-rDK/strings_about.xml
index 837d419..87fc65b 100644
--- a/about/src/main/res/values-da-rDK/strings_about.xml
+++ b/about/src/main/res/values-da-rDK/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Denne app vil ikke være mulig uden de følgende fantastiske biblioteker.</string>
<string name="kau_about_faq_intro">Ofte stillede spørgsmål</string>
diff --git a/about/src/main/res/values-de-rDE/strings_about.xml b/about/src/main/res/values-de-rDE/strings_about.xml
index 5d7bc28..69df4d9 100644
--- a/about/src/main/res/values-de-rDE/strings_about.xml
+++ b/about/src/main/res/values-de-rDE/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Diese App wäre nicht möglich ohne die folgenden großartigen Bibliotheken.</string>
<string name="kau_about_faq_intro">Häufige Fragen / FAQ</string>
diff --git a/about/src/main/res/values-es-rES/strings_about.xml b/about/src/main/res/values-es-rES/strings_about.xml
index 3fb0bed..743bc4d 100644
--- a/about/src/main/res/values-es-rES/strings_about.xml
+++ b/about/src/main/res/values-es-rES/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Esta aplicación no sería posible sin las siguientes geniales librerías.</string>
<string name="kau_about_faq_intro">Preguntas Frecuentes</string>
diff --git a/about/src/main/res/values-fr-rFR/strings_about.xml b/about/src/main/res/values-fr-rFR/strings_about.xml
index 91db02c..0d50f86 100644
--- a/about/src/main/res/values-fr-rFR/strings_about.xml
+++ b/about/src/main/res/values-fr-rFR/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Ce soft ne serait pas possible sans ces super bibliothèques.</string>
<string name="kau_about_faq_intro">FAQ</string>
diff --git a/about/src/main/res/values-gl-rES/strings_about.xml b/about/src/main/res/values-gl-rES/strings_about.xml
index fe64f7f..f0da61f 100644
--- a/about/src/main/res/values-gl-rES/strings_about.xml
+++ b/about/src/main/res/values-gl-rES/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Esta aplicación non sería posible sen a existencia destas fantásticas librarías.</string>
<string name="kau_about_faq_intro">Preguntas frecuentes</string>
diff --git a/about/src/main/res/values-hu-rHU/strings_about.xml b/about/src/main/res/values-hu-rHU/strings_about.xml
index d57e13d..e4efded 100644
--- a/about/src/main/res/values-hu-rHU/strings_about.xml
+++ b/about/src/main/res/values-hu-rHU/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Ez az app nem jöhetett volna létre a következő könyvtárak nélkül.</string>
<string name="kau_about_faq_intro">GyIK</string>
diff --git a/about/src/main/res/values-in-rID/strings_about.xml b/about/src/main/res/values-in-rID/strings_about.xml
index e2e83a7..5bdee31 100644
--- a/about/src/main/res/values-in-rID/strings_about.xml
+++ b/about/src/main/res/values-in-rID/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Aplikasi ini tidak mungkin dilakukan tanpa perpustakaan besar berikut ini.</string>
<string name="kau_about_faq_intro">FAQ</string>
diff --git a/about/src/main/res/values-it-rIT/strings_about.xml b/about/src/main/res/values-it-rIT/strings_about.xml
index 170ff15..5867d94 100644
--- a/about/src/main/res/values-it-rIT/strings_about.xml
+++ b/about/src/main/res/values-it-rIT/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Questa applicazione non sarebbe possibile senza queste fantastiche librerie.</string>
<string name="kau_about_faq_intro">Domande frequenti</string>
diff --git a/about/src/main/res/values-ko-rKR/strings_about.xml b/about/src/main/res/values-ko-rKR/strings_about.xml
index f6b4413..00c80e3 100644
--- a/about/src/main/res/values-ko-rKR/strings_about.xml
+++ b/about/src/main/res/values-ko-rKR/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">이 앱은 아래의 라이브러리가 없었다면 만들 수 없었습니다.</string>
<string name="kau_about_faq_intro">FAQ</string>
diff --git a/about/src/main/res/values-nl-rNL/strings_about.xml b/about/src/main/res/values-nl-rNL/strings_about.xml
new file mode 100644
index 0000000..570984d
--- /dev/null
+++ b/about/src/main/res/values-nl-rNL/strings_about.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<resources>
+ <string name="kau_about_libraries_intro">Deze app is mede mogelijk gemaakt door de volgende geweldige libraries.</string>
+ <string name="kau_about_faq_intro">Veelgestelde vragen</string>
+</resources>
diff --git a/about/src/main/res/values-no-rNO/strings_about.xml b/about/src/main/res/values-no-rNO/strings_about.xml
index 2cffcbc..328fda3 100644
--- a/about/src/main/res/values-no-rNO/strings_about.xml
+++ b/about/src/main/res/values-no-rNO/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Denne appens eksistens ville ikke vært mulig uten de flotte, følgende bibliotekene.</string>
<string name="kau_about_faq_intro">Spørsmål og svar</string>
diff --git a/about/src/main/res/values-pl-rPL/strings_about.xml b/about/src/main/res/values-pl-rPL/strings_about.xml
index cfdd1ef..a5daa6d 100644
--- a/about/src/main/res/values-pl-rPL/strings_about.xml
+++ b/about/src/main/res/values-pl-rPL/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Aplikacja nie byłaby możliwa bez następujących świetnych bibliotek.</string>
<string name="kau_about_faq_intro">FAQ</string>
diff --git a/about/src/main/res/values-pt-rBR/strings_about.xml b/about/src/main/res/values-pt-rBR/strings_about.xml
index e6feb8d..8e98238 100644
--- a/about/src/main/res/values-pt-rBR/strings_about.xml
+++ b/about/src/main/res/values-pt-rBR/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Este aplicativo não seria possível sem as seguintes excelentes bibliotecas.</string>
<string name="kau_about_faq_intro">Perguntas Frequentes</string>
diff --git a/about/src/main/res/values-pt-rPT/strings_about.xml b/about/src/main/res/values-pt-rPT/strings_about.xml
new file mode 100644
index 0000000..d092302
--- /dev/null
+++ b/about/src/main/res/values-pt-rPT/strings_about.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<resources>
+ <string name="kau_about_libraries_intro">Esta aplicação não seria possível sem as seguintes bibliotecas.</string>
+ <string name="kau_about_faq_intro">FAQ</string>
+</resources>
diff --git a/about/src/main/res/values-sr-rSP/strings_about.xml b/about/src/main/res/values-sr-rSP/strings_about.xml
new file mode 100644
index 0000000..550aa9b
--- /dev/null
+++ b/about/src/main/res/values-sr-rSP/strings_about.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<resources>
+ <string name="kau_about_libraries_intro">Ова апликација не бу била могућа без ових одличних библиотека.</string>
+ <string name="kau_about_faq_intro">ЧПП</string>
+</resources>
diff --git a/about/src/main/res/values-sv-rSE/strings_about.xml b/about/src/main/res/values-sv-rSE/strings_about.xml
index 02f5417..d8f888f 100644
--- a/about/src/main/res/values-sv-rSE/strings_about.xml
+++ b/about/src/main/res/values-sv-rSE/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Den här appen skulle inte varit möjlig utan följande bibliotek.</string>
<string name="kau_about_faq_intro">Vanliga frågor</string>
diff --git a/about/src/main/res/values-th-rTH/strings_about.xml b/about/src/main/res/values-th-rTH/strings_about.xml
index ab1863b..7a3a5ed 100644
--- a/about/src/main/res/values-th-rTH/strings_about.xml
+++ b/about/src/main/res/values-th-rTH/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">แอพนี้จะไม่สามารถเกิดขึ้นได้ถ้าไม่ได้ไลบาลี้เหล่านี้</string>
<string name="kau_about_faq_intro">ถามตอบ</string>
diff --git a/about/src/main/res/values-tr-rTR/strings_about.xml b/about/src/main/res/values-tr-rTR/strings_about.xml
index b54bb6e..857aec3 100644
--- a/about/src/main/res/values-tr-rTR/strings_about.xml
+++ b/about/src/main/res/values-tr-rTR/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Bu uygulama aşağıdaki büyük kütüphaneler olmadan mümkün olmayacaktır.</string>
<string name="kau_about_faq_intro">SSS</string>
diff --git a/about/src/main/res/values-uk-rUA/strings_about.xml b/about/src/main/res/values-uk-rUA/strings_about.xml
index 1ca3901..d4dca9b 100644
--- a/about/src/main/res/values-uk-rUA/strings_about.xml
+++ b/about/src/main/res/values-uk-rUA/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Цей додаток не був би можливим без використання великих бібліотек.</string>
<string name="kau_about_faq_intro">FAQ</string>
diff --git a/about/src/main/res/values-vi-rVN/strings_about.xml b/about/src/main/res/values-vi-rVN/strings_about.xml
index a71d127..4f84966 100644
--- a/about/src/main/res/values-vi-rVN/strings_about.xml
+++ b/about/src/main/res/values-vi-rVN/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">Ứng dụng này ra đời nhờ những thư viện tuyệt vời dưới đây.</string>
<string name="kau_about_faq_intro">CÂU HỎI THƯỜNG GẶP</string>
diff --git a/about/src/main/res/values-zh-rCN/strings_about.xml b/about/src/main/res/values-zh-rCN/strings_about.xml
index 8625ef7..cf63c9a 100644
--- a/about/src/main/res/values-zh-rCN/strings_about.xml
+++ b/about/src/main/res/values-zh-rCN/strings_about.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
<resources>
<string name="kau_about_libraries_intro">没有以下的大数据库,这个应用程序不会运行。</string>
<string name="kau_about_faq_intro">常见问题</string>
diff --git a/about/src/main/res/values-zh-rTW/strings_about.xml b/about/src/main/res/values-zh-rTW/strings_about.xml
new file mode 100644
index 0000000..a292a93
--- /dev/null
+++ b/about/src/main/res/values-zh-rTW/strings_about.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<resources>
+ <string name="kau_about_libraries_intro">若無下述函式庫的幫忙, 本程式無法成真.</string>
+ <string name="kau_about_faq_intro">常見問題</string>
+</resources>