-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use NoScrollViewPager instead of FragmentChangManager, add function t…
…o update fragment with position
- Loading branch information
chenshixin
committed
Aug 17, 2016
1 parent
e54fa35
commit a07282f
Showing
5 changed files
with
56 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
bottom-navigation/src/main/java/com/chenshixin/bottomnavigation/FragmentChangManager.kt
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
bottom-navigation/src/main/java/com/chenshixin/bottomnavigation/NoScrollViewPager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.chenshixin.bottomnavigation | ||
|
||
import android.content.Context | ||
import android.support.v4.view.ViewPager | ||
import android.util.AttributeSet | ||
import android.view.MotionEvent | ||
|
||
/** | ||
* ViewPager without scroll between tabs | ||
* Created by chenshixin on 7/18/16. | ||
*/ | ||
class NoScrollViewPager(context: Context, attributeSet: AttributeSet) : ViewPager(context, attributeSet) { | ||
|
||
override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean { | ||
return false | ||
} | ||
|
||
override fun onTouchEvent(ev: MotionEvent?): Boolean { | ||
return false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters