style(banner): 배너 ktlint 지적을 정리한다
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -82,10 +82,11 @@ class BannerAdapter(
|
||||
width = itemSizePx
|
||||
height = itemSizePx
|
||||
}
|
||||
imageView.layoutParams = (imageView.layoutParams ?: ViewGroup.LayoutParams(
|
||||
val imageLayoutParams = imageView.layoutParams ?: ViewGroup.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT
|
||||
)).apply {
|
||||
)
|
||||
imageView.layoutParams = imageLayoutParams.apply {
|
||||
width = ViewGroup.LayoutParams.MATCH_PARENT
|
||||
height = ViewGroup.LayoutParams.MATCH_PARENT
|
||||
}
|
||||
|
||||
@@ -75,7 +75,6 @@ class BannerView @JvmOverloads constructor(
|
||||
super.onDetachedFromWindow()
|
||||
}
|
||||
|
||||
|
||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||
val widthSize = MeasureSpec.getSize(widthMeasureSpec)
|
||||
val heightMode = MeasureSpec.getMode(heightMeasureSpec)
|
||||
|
||||
@@ -371,7 +371,6 @@ class BannerViewTest {
|
||||
listener.onScrollStateChanged(findViewById(R.id.rv_banner), state)
|
||||
}
|
||||
|
||||
|
||||
private fun BannerView.setCurrentPositionForTest(position: Int) {
|
||||
BannerView::class.java.getDeclaredField("currentAdapterPosition").apply {
|
||||
isAccessible = true
|
||||
@@ -379,7 +378,12 @@ class BannerViewTest {
|
||||
}
|
||||
BannerView::class.java.getDeclaredField("currentIndex").apply {
|
||||
isAccessible = true
|
||||
setInt(this@setCurrentPositionForTest, requireNotNull(findViewById<RecyclerView>(R.id.rv_banner).adapter as? BannerAdapter).toRealIndex(position))
|
||||
setInt(
|
||||
this@setCurrentPositionForTest,
|
||||
requireNotNull(
|
||||
findViewById<RecyclerView>(R.id.rv_banner).adapter as? BannerAdapter
|
||||
).toRealIndex(position)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user