Skip to content
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.

Commit

Permalink
Merge pull request #143 from yevhenii-kanivets/142_fix_bug_connected_…
Browse files Browse the repository at this point in the history
…to_fab_clicker

#142. Fix bug connected to fab clicker.
  • Loading branch information
yev-kanivets authored Jul 19, 2019
2 parents e87658f + 09c79e4 commit 43fc507
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ class MainActivity : AppCompatActivity() {
val adapter = ViewPagerAdapter(supportFragmentManager)
viewPager.adapter = adapter

spSort.background.setColorFilter(ContextCompat.getColor(this, R.color.white), PorterDuff.Mode.SRC_ATOP)

viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
val viewPagerListener = object : ViewPager.OnPageChangeListener {

override fun onPageScrollStateChanged(state: Int) {
}
Expand Down Expand Up @@ -84,7 +82,12 @@ class MainActivity : AppCompatActivity() {
}
}

})
}

viewPagerListener.onPageSelected(0)
viewPager.addOnPageChangeListener(viewPagerListener)

spSort.background.setColorFilter(ContextCompat.getColor(this, R.color.white), PorterDuff.Mode.SRC_ATOP)

bottomNavigation.setOnNavigationItemSelectedListener { item ->
when (item.itemId) {
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:src="@drawable/ic_plus"
app:elevation="10dp"
app:layout_constraintBottom_toBottomOf="@id/bottomNavigation"
app:layout_constraintEnd_toEndOf="@id/bottomNavigation"
Expand Down

0 comments on commit 43fc507

Please sign in to comment.