mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 03:28:52 +01:00
Fix initial selected state for pager title view
This commit is contained in:
@@ -70,6 +70,10 @@ class PagerTitleView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||
addView(view)
|
||||
}
|
||||
|
||||
childCount.forEach { index ->
|
||||
getChildAt(index).isSelected = index == pager?.currentItem
|
||||
}
|
||||
|
||||
pager?.addOnPageChangeListener(object : ViewPager.SimpleOnPageChangeListener() {
|
||||
override fun onPageSelected(position: Int) {
|
||||
childCount.forEach { index ->
|
||||
|
||||
Reference in New Issue
Block a user