aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt4
-rw-r--r--docs/Changelog.md1
-rw-r--r--fastadapter-viewbinding/src/main/kotlin/ca/allanwang/fastadapter/viewbinding/BindingItem.kt2
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt4
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/PermissionCheckbox.kt5
-rw-r--r--sample/src/main/res/xml/kau_changelog.xml2
6 files changed, 7 insertions, 11 deletions
diff --git a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt
index 39fb1cf..27849bc 100644
--- a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt
+++ b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt
@@ -143,8 +143,8 @@ class CircleView @JvmOverloads constructor(context: Context, attrs: AttributeSet
setMeasuredDimension(measuredWidth, measuredWidth)
}
- override fun onDraw(canvas: Canvas) {
- super.onDraw(canvas)
+ override fun onDrawForeground(canvas: Canvas) {
+ super.onDrawForeground(canvas)
val centerWidth = (measuredWidth / 2).toFloat()
val centerHeight = (measuredHeight / 2).toFloat()
if (withBorder) canvas.drawCircle(centerWidth, centerHeight, centerWidth, whitePaint)
diff --git a/docs/Changelog.md b/docs/Changelog.md
index 37e355e..9f45e87 100644
--- a/docs/Changelog.md
+++ b/docs/Changelog.md
@@ -2,6 +2,7 @@
## v5.2.0
* :about: Migrate about libraries to v7.x.x
+* :color: Draw CircleView in foreground instead of background
* :core: Migrate iconics to v4.x.x
* :core: Automatically switch light mode for navigationBarColor and statusBarColor
* :core: Remove statusBarLight toggle
diff --git a/fastadapter-viewbinding/src/main/kotlin/ca/allanwang/fastadapter/viewbinding/BindingItem.kt b/fastadapter-viewbinding/src/main/kotlin/ca/allanwang/fastadapter/viewbinding/BindingItem.kt
index 543a9ef..96055e4 100644
--- a/fastadapter-viewbinding/src/main/kotlin/ca/allanwang/fastadapter/viewbinding/BindingItem.kt
+++ b/fastadapter-viewbinding/src/main/kotlin/ca/allanwang/fastadapter/viewbinding/BindingItem.kt
@@ -153,4 +153,4 @@ abstract class BindingClickEventHook<Binding : ViewBinding, Item : BindingItem<B
}
abstract fun Binding.onClick(v: View, position: Int, fastAdapter: FastAdapter<Item>, item: Item)
-} \ No newline at end of file
+}
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
index 50b3cf3..a472f09 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
@@ -18,20 +18,16 @@ package ca.allanwang.kau.sample
import android.os.Bundle
import ca.allanwang.kau.adapters.SingleFastAdapter
import ca.allanwang.kau.internal.KauBaseActivity
-import ca.allanwang.kau.logging.KL
import ca.allanwang.kau.permissions.PERMISSION_ACCESS_COARSE_LOCATION
import ca.allanwang.kau.permissions.PERMISSION_ACCESS_FINE_LOCATION
import ca.allanwang.kau.permissions.PERMISSION_CAMERA
-import ca.allanwang.kau.permissions.kauRequestPermissions
import ca.allanwang.kau.swipe.SWIPE_EDGE_LEFT
import ca.allanwang.kau.swipe.kauSwipeOnCreate
import ca.allanwang.kau.swipe.kauSwipeOnDestroy
import ca.allanwang.kau.utils.fullLinearRecycler
import ca.allanwang.kau.utils.startActivity
-import ca.allanwang.kau.utils.toast
import ca.allanwang.kau.utils.withAlpha
import ca.allanwang.kau.utils.withSlideOut
-import com.mikepenz.fastadapter.adapters.FastItemAdapter
/**
* Created by Allan Wang on 2017-06-12.
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/PermissionCheckbox.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/PermissionCheckbox.kt
index 40ad663..50cfe69 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/PermissionCheckbox.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/PermissionCheckbox.kt
@@ -15,7 +15,6 @@
*/
package ca.allanwang.kau.sample
-import android.Manifest
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@@ -98,7 +97,7 @@ class PermissionCheckboxViewBinding(
item: PermissionCheckboxViewBinding
) {
KL.d { "Perm Click" }
- with (v.context) {
+ with(v.context) {
kauRequestPermissions(item.data.permission) { granted, _ ->
toast("${item.data.permission} enabled: $granted")
fastAdapter.notifyAdapterDataSetChanged()
@@ -107,4 +106,4 @@ class PermissionCheckboxViewBinding(
}
}
}
-} \ No newline at end of file
+}
diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml
index d8c167f..2907e43 100644
--- a/sample/src/main/res/xml/kau_changelog.xml
+++ b/sample/src/main/res/xml/kau_changelog.xml
@@ -8,13 +8,13 @@
<version title="v5.2.0" />
<item text=":about: Migrate about libraries to v7.x.x" />
+ <item text=":color: Draw CircleView in foreground instead of background" />
<item text=":core: Migrate iconics to v4.x.x" />
<item text=":core: Automatically switch light mode for navigationBarColor and statusBarColor" />
<item text=":core: Remove statusBarLight toggle" />
<item text=":core: Remove kau_status_bar_height; height should be found programmatically" />
<item text=":fastadapter: Migrate fastadapter to v4.x.x" />
<item text=":fastadapter-viewbinding: Create helper items for ViewBinding" />
- <item text="" />
<version title="v5.1.0" />
<item text=":adapter: Moved fastadapter elements to new module, :fastadapter:. To migrate, simply rename the dependency. If you don't use fast adapter, no changes are necessary" />