diff options
-rw-r--r-- | about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt | 2 | ||||
-rw-r--r-- | about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt | 13 | ||||
-rw-r--r-- | about/src/main/res/layout/kau_iitem_library.xml | 38 | ||||
-rw-r--r-- | docs/Changelog.md | 3 | ||||
-rw-r--r-- | gradle.properties | 4 |
5 files changed, 28 insertions, 32 deletions
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 b153fc9..0729ea4 100644 --- a/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt +++ b/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt @@ -19,7 +19,7 @@ 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(it) }, R.id.kau_item_faq + R.layout.kau_iitem_faq, ::ViewHolder, R.id.kau_item_faq ), ThemableIItem by ThemableIItemDelegate() { companion object { 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 f61c72c..89906c3 100644 --- a/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt +++ b/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt @@ -21,21 +21,20 @@ 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(it) }, 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 { - val c = v.context + if (item !is LibraryIItem) + false + else with(item.lib) { - c.startLink(libraryWebsite, repositoryLink, authorWebsite) + v.context.startLink(libraryWebsite, repositoryLink, authorWebsite) + true } - true - } } } } diff --git a/about/src/main/res/layout/kau_iitem_library.xml b/about/src/main/res/layout/kau_iitem_library.xml index 759a622..47b4e01 100644 --- a/about/src/main/res/layout/kau_iitem_library.xml +++ b/about/src/main/res/layout/kau_iitem_library.xml @@ -16,50 +16,45 @@ android:paddingStart="@dimen/kau_padding_normal" android:paddingTop="@dimen/kau_padding_normal"> - <android.support.constraint.Guideline - android:id="@+id/lib_g_m_v" - android:layout_width="1dp" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_percent="0.5" /> - <TextView android:id="@+id/lib_item_name" android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/kau_padding_normal" android:ellipsize="end" android:gravity="start" - android:maxLines="1" + android:lines="1" android:textSize="@dimen/textSizeLarge_openSource" android:textStyle="normal" - app:layout_constraintEnd_toStartOf="@id/lib_g_m_v" + app:layout_constraintEnd_toStartOf="@+id/lib_item_author" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" + app:layout_goneMarginEnd="0dp" tools:text="Library name" /> + <TextView - android:id="@+id/lib_item_author" - android:layout_width="0dp" + android:id="@id/lib_item_author" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="2dp" android:gravity="end" - android:maxLines="2" + android:lines="1" android:textSize="@dimen/textSizeSmall_openSource" android:textStyle="normal" + app:layout_constraintBottom_toBottomOf="@id/lib_item_name" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toEndOf="@id/lib_g_m_v" app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.5" tools:text="Author" /> - <android.support.constraint.Barrier + <View android:id="@+id/lib_item_top_divider" android:layout_width="wrap_content" android:layout_height="1px" android:layout_marginTop="@dimen/kau_spacing_micro" - app:barrierDirection="bottom" - app:constraint_referenced_ids="lib_item_name,lib_item_author" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/lib_item_name" /> <TextView android:id="@+id/lib_item_description" @@ -96,14 +91,14 @@ android:textSize="@dimen/textSizeSmall_openSource" android:textStyle="normal" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toStartOf="@id/lib_g_m_v" + app:layout_constraintEnd_toStartOf="@+id/lib_item_license" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/lib_item_bottom_divider" tools:text="Version" /> <TextView - android:id="@+id/lib_item_license" - android:layout_width="0dp" + android:id="@id/lib_item_license" + android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="@dimen/kau_spacing_normal" android:layout_marginTop="@dimen/kau_spacing_micro" @@ -114,7 +109,6 @@ android:textStyle="normal" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toEndOf="@id/lib_g_m_v" app:layout_constraintTop_toBottomOf="@id/lib_item_bottom_divider" tools:text="License" /> diff --git a/docs/Changelog.md b/docs/Changelog.md index 1e75ba0..e6e4488 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -1,5 +1,8 @@ # Changelog +## v3.6.1 +* :core: [Breaking] Removed private text field and introduced lazy logging functions + ## v3.6.0 * :adapter: Create withOnRepeatedClickListener * :core: Create kotlin flyweight diff --git a/gradle.properties b/gradle.properties index 5c72b0e..f8f5c0b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,10 +23,10 @@ TARGET_SDK=27 BUILD_TOOLS=27.0.2 ANDROID_SUPPORT_LIBS=27.0.2 -VERSION_NAME=3.5.1.0 +VERSION_NAME=3.6.1.0 KOTLIN=1.2.10 -ABOUT_LIBRARIES=6.0.0 +ABOUT_LIBRARIES=6.0.1 ANKO=0.10.3 BLURRY=2.1.1 CONSTRAINT_LAYOUT=1.1.0-beta4 |