Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mystery00 committed Oct 15, 2018
1 parent e79800c commit bff7e15
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class BottomTabView(context: Context, attrs: AttributeSet?, defStyleAttr: Int) :
/**
* 设置链接的ViewPager
*/
fun linkViewPager(viewPager: ViewPager, listener: ((Int) -> Unit)?, isShowAnimationWhenClickItem: Boolean = true) {
fun linkViewPager(viewPager: ViewPager, listener: ((Int) -> Unit)?, isShowAnimationWhenClickItem: Boolean = true): BottomTabView {
setOnItemSelectedListener { viewPager.setCurrentItem(indexOf(it), isShowAnimationWhenClickItem) }
viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrollStateChanged(state: Int) {
Expand All @@ -131,6 +131,7 @@ class BottomTabView(context: Context, attrs: AttributeSet?, defStyleAttr: Int) :
listener?.invoke(position)
}
})
return this
}

/**
Expand Down

0 comments on commit bff7e15

Please sign in to comment.