Please help. Have already tried all existing solutions but it does not work. There is the part of the code
tabLayout.getTabAt(2)?.customView?.setBackgroundColor(Color.parseColor("#000000"))
Please help. Have already tried all existing solutions but it does not work. There is the part of the code
tabLayout.getTabAt(2)?.customView?.setBackgroundColor(Color.parseColor("#000000"))
Instead of customView()
use getCsutomView()
. Code should be like:
tabLayout.getTabAt(2)?.getCustomView?.setBackgroundColor(Color.parseColor("#000000"))
This should fix your problem.