notify_tab_bar.addOnTabSelectedListener(object: TabLayout.OnTabSelectedListener { override fun onTabSelected(tab: TabLayout.Tab?) { notify_tab_bar.isEnabled = false //選擇時觸發 tab.let { } } override fun onTabUnselected(tab: TabLayout.Tab?) { //未選擇是觸發 } override fun onTabReselected(tab: TabLayout.Tab?) { tab.let { //選中以後再次點擊即複選時觸發 } } })