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:
2026-05-28 12:10:02 +09:00
parent 2fa9561a09
commit 9a56c124cc
3 changed files with 9 additions and 5 deletions

View File

@@ -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
}

View File

@@ -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)

View File

@@ -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)
)
}
}