mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-06-16 04:19:19 +00:00
Improve: Android Studio's Reformat
This commit is contained in:
@ -10,10 +10,11 @@ import com.looker.droidify.utility.extension.resources.getDrawableFromAttr
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
class DividerItemDecoration(
|
||||
context: Context, private val configure: (
|
||||
context: Context,
|
||||
private val configure: (
|
||||
context: Context,
|
||||
position: Int, configuration: Configuration
|
||||
) -> Unit
|
||||
position: Int, configuration: Configuration,
|
||||
) -> Unit,
|
||||
) : RecyclerView.ItemDecoration() {
|
||||
interface Configuration {
|
||||
fun set(needDivider: Boolean, toTop: Boolean, paddingStart: Int, paddingEnd: Int)
|
||||
@ -49,7 +50,7 @@ class DividerItemDecoration(
|
||||
view: View,
|
||||
top: Int,
|
||||
width: Int,
|
||||
rtl: Boolean
|
||||
rtl: Boolean,
|
||||
) {
|
||||
val divider = divider
|
||||
val left = if (rtl) configuration.paddingEnd else configuration.paddingStart
|
||||
@ -105,7 +106,7 @@ class DividerItemDecoration(
|
||||
outRect: Rect,
|
||||
view: View,
|
||||
parent: RecyclerView,
|
||||
state: RecyclerView.State
|
||||
state: RecyclerView.State,
|
||||
) {
|
||||
val configuration = view.configuration
|
||||
val position = parent.getChildAdapterPosition(view)
|
||||
|
@ -33,7 +33,7 @@ class RecyclerFastScroller(private val recyclerView: RecyclerView) {
|
||||
private data class FastScrolling(
|
||||
val startAtThumbOffset: Float?,
|
||||
val startY: Float,
|
||||
val currentY: Float
|
||||
val currentY: Float,
|
||||
)
|
||||
|
||||
private var scrolling = false
|
||||
@ -130,7 +130,7 @@ class RecyclerFastScroller(private val recyclerView: RecyclerView) {
|
||||
itemHeight: Int,
|
||||
thumbHeight: Int,
|
||||
range: Int,
|
||||
fastScrolling: FastScrolling
|
||||
fastScrolling: FastScrolling,
|
||||
) {
|
||||
val offset = calculateOffset(thumbHeight, fastScrolling)
|
||||
val scrollPosition = ((range - recyclerView.height) * offset).roundToInt()
|
||||
|
Reference in New Issue
Block a user