This file contains hidden or 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 class is FragmentPagerAdapter where all the fragments are in an array and you can access to them later. | |
* @property mFragments the list of fragments, | |
* @property NUMBER_OF_FRAGMENTS the total number of fragments that will be created. Change the value of this param accordingly. | |
*/ | |
class MyFragmentPagerAdapter(fm: FragmentManager) : FragmentPagerAdapter(fm) { | |
companion object { | |
private val NUMBER_OF_FRAGMENTS = 2 | |
} |
This file contains hidden or 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
class MyTabLayout : TabLayout { | |
private val mTitles: MutableList<String> = arrayListOf() | |
private var mUnselectedTypeFace: Typeface? = null | |
constructor(context: Context?) : super(context) { | |
init(context, null) | |
} | |
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) { | |
init(context, attrs) |