Clean up some companion object usages
This commit is contained in:
@@ -40,15 +40,13 @@ class PageIndicatorTextView(
|
||||
|
||||
super.setText(finalText, BufferType.SPANNABLE)
|
||||
}
|
||||
|
||||
private companion object {
|
||||
private val fillColor = Color.rgb(235, 235, 235)
|
||||
private val strokeColor = Color.rgb(45, 45, 45)
|
||||
|
||||
// A span object with text outlining properties
|
||||
val spanOutline = OutlineSpan(
|
||||
strokeColor = strokeColor,
|
||||
strokeWidth = 4f
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private val fillColor = Color.rgb(235, 235, 235)
|
||||
private val strokeColor = Color.rgb(45, 45, 45)
|
||||
|
||||
// A span object with text outlining properties
|
||||
private val spanOutline = OutlineSpan(
|
||||
strokeColor = strokeColor,
|
||||
strokeWidth = 4f
|
||||
)
|
||||
|
||||
+12
-14
@@ -219,18 +219,16 @@ class ReaderColorFilterSettings @JvmOverloads constructor(context: Context, attr
|
||||
val updatedColor = (color shl bitShift) or (currentColor and mask.inv().toInt())
|
||||
preferences.colorFilterValue().set(updatedColor)
|
||||
}
|
||||
|
||||
private companion object {
|
||||
/** Integer mask of alpha value **/
|
||||
const val ALPHA_MASK: Long = 0xFF000000
|
||||
|
||||
/** Integer mask of red value **/
|
||||
const val RED_MASK: Long = 0x00FF0000
|
||||
|
||||
/** Integer mask of green value **/
|
||||
const val GREEN_MASK: Long = 0x0000FF00
|
||||
|
||||
/** Integer mask of blue value **/
|
||||
const val BLUE_MASK: Long = 0x000000FF
|
||||
}
|
||||
}
|
||||
|
||||
/** Integer mask of alpha value **/
|
||||
private const val ALPHA_MASK: Long = 0xFF000000
|
||||
|
||||
/** Integer mask of red value **/
|
||||
private const val RED_MASK: Long = 0x00FF0000
|
||||
|
||||
/** Integer mask of green value **/
|
||||
private const val GREEN_MASK: Long = 0x0000FF00
|
||||
|
||||
/** Integer mask of blue value **/
|
||||
private const val BLUE_MASK: Long = 0x000000FF
|
||||
|
||||
@@ -183,16 +183,14 @@ class WebtoonAdapter(val viewer: WebtoonViewer) : RecyclerView.Adapter<RecyclerV
|
||||
return newItems.size
|
||||
}
|
||||
}
|
||||
|
||||
private companion object {
|
||||
/**
|
||||
* View holder type of a chapter page view.
|
||||
*/
|
||||
const val PAGE_VIEW = 0
|
||||
|
||||
/**
|
||||
* View holder type of a chapter transition view.
|
||||
*/
|
||||
const val TRANSITION_VIEW = 1
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* View holder type of a chapter page view.
|
||||
*/
|
||||
private const val PAGE_VIEW = 0
|
||||
|
||||
/**
|
||||
* View holder type of a chapter transition view.
|
||||
*/
|
||||
private const val TRANSITION_VIEW = 1
|
||||
|
||||
+5
-7
@@ -314,11 +314,9 @@ open class WebtoonRecyclerView @JvmOverloads constructor(
|
||||
return super.onTouchEvent(ev)
|
||||
}
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val ANIMATOR_DURATION_TIME = 200
|
||||
const val MIN_RATE = 0.5f
|
||||
const val DEFAULT_RATE = 1f
|
||||
const val MAX_SCALE_RATE = 3f
|
||||
}
|
||||
}
|
||||
|
||||
private const val ANIMATOR_DURATION_TIME = 200
|
||||
private const val MIN_RATE = 0.5f
|
||||
private const val DEFAULT_RATE = 1f
|
||||
private const val MAX_SCALE_RATE = 3f
|
||||
|
||||
Reference in New Issue
Block a user