redsign wheel page (reorgnatize wheel)
Auto Tag on Version Change / check-version (push) Successful in 3s

This commit is contained in:
2026-06-03 04:10:05 +05:00
parent 890cf15fd0
commit 5f6ec236bf
@@ -55,12 +55,12 @@ class CircularNavFragment : Fragment() {
CircularWheelView.WheelItem(def.id, def.iconRes, ctx.getString(def.titleRes))
}
items = listOf(
CircularWheelView.WheelItem(R.id.nav_dashboard, R.drawable.ic_nav_dashboard, ctx.getString(R.string.nav_dashboard)),
savedSlots[0], // 2 o'clock
savedSlots[1], // 4 o'clock
CircularWheelView.WheelItem(R.id.nav_more, R.drawable.ic_nav_more, ctx.getString(R.string.nav_more)),
savedSlots[2], // 8 o'clock
savedSlots[3], // 10 o'clock
savedSlots[3], // 4 o'clock (strip slot 3)
CircularWheelView.WheelItem(R.id.nav_dashboard, R.drawable.ic_nav_dashboard, ctx.getString(R.string.nav_dashboard)), // 6 o'clock
CircularWheelView.WheelItem(R.id.nav_more, R.drawable.ic_nav_more, ctx.getString(R.string.nav_more)), // 8 o'clock
savedSlots[0], // 10 o'clock (strip slot 0 — first in strip)
savedSlots[1], // 12 o'clock (strip slot 1)
savedSlots[2], // 2 o'clock (strip slot 2)
)
accentColor = colorPrimary
surfaceColor = colorSurface
@@ -264,7 +264,7 @@ class CircularWheelView @JvmOverloads constructor(
// Divider lines between segments
dividerPaint.color = (labelColor and 0x00FFFFFF) or (100 shl 24)
for (i in 0 until segCount) {
val rad = Math.toRadians((-90.0 + i * segDeg))
val rad = Math.toRadians((i * segDeg).toDouble())
val cos = cos(rad).toFloat()
val sin = sin(rad).toFloat()
canvas.drawLine(
@@ -276,7 +276,7 @@ class CircularWheelView @JvmOverloads constructor(
// Segment content
for (i in 0 until segCount) {
val midDeg = -90f + i * segDeg + segDeg / 2f
val midDeg = i * segDeg + segDeg / 2f
drawSegment(canvas, i, midDeg)
}
@@ -419,7 +419,7 @@ class CircularWheelView @JvmOverloads constructor(
private fun segmentAt(x: Float, y: Float): Int {
var a = angleAt(x, y) - wheelAngle
a = ((a + 90f) % 360f + 360f) % 360f
a = (a % 360f + 360f) % 360f
return (a / (360f / items.size)).toInt() % items.size
}