Created
January 31, 2020 18:18
-
-
Save siscofran999/c151fc9f881737396ec237bdd89d197e to your computer and use it in GitHub Desktop.
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
val tabs = tabLayout.getChildAt(0) as ViewGroup | |
for (i in 0 until tabs.childCount - 1) { | |
val tab = tabs.getChildAt(i) | |
val layoutParams = tab.layoutParams as LinearLayout.LayoutParams | |
layoutParams.marginEnd = dpToPx(resources, 8f).toInt() | |
layoutParams.marginStart = dpToPx(resources, 8f).toInt() | |
tab.layoutParams = layoutParams | |
tabLayout.requestLayout() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment