You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Replace old design with redesign (p3)
This commit is contained in:
@@ -10,6 +10,7 @@ import androidx.core.view.get
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.topjohnwu.magisk.extensions.drawableCompat
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
class KItemDecoration(
|
||||
private val context: Context,
|
||||
@@ -63,7 +64,7 @@ class KItemDecoration(
|
||||
.map { parent[it] }
|
||||
.forEach { child ->
|
||||
parent.getDecoratedBoundsWithMargins(child, bounds)
|
||||
val bottom = bounds.bottom + Math.round(child.translationY)
|
||||
val bottom = bounds.bottom + child.translationY.roundToInt()
|
||||
val top = bottom - drawable.intrinsicHeight
|
||||
drawable.setBounds(left, top, right, bottom)
|
||||
drawable.draw(canvas)
|
||||
@@ -93,7 +94,7 @@ class KItemDecoration(
|
||||
.map { parent[it] }
|
||||
.forEach { child ->
|
||||
parent.layoutManager!!.getDecoratedBoundsWithMargins(child, bounds)
|
||||
val right = bounds.right + Math.round(child.translationX)
|
||||
val right = bounds.right + child.translationX.roundToInt()
|
||||
val left = right - drawable.intrinsicWidth
|
||||
drawable.setBounds(left, top, right, bottom)
|
||||
drawable.draw(canvas)
|
||||
@@ -114,4 +115,4 @@ class KItemDecoration(
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ interface SafetyNetHelper {
|
||||
|
||||
companion object {
|
||||
|
||||
val RESPONSE_ERR = 0x01
|
||||
val CONNECTION_FAIL = 0x02
|
||||
const val RESPONSE_ERR = 0x01
|
||||
const val CONNECTION_FAIL = 0x02
|
||||
|
||||
val BASIC_PASS = 0x10
|
||||
val CTS_PASS = 0x20
|
||||
const val BASIC_PASS = 0x10
|
||||
const val CTS_PASS = 0x20
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user