Created
July 4, 2019 10:14
-
-
Save BilalSiddiqui/adc9777f1037af36c0294c339ee1e482 to your computer and use it in GitHub Desktop.
Set width of tab item in Tab layout
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
ViewGroup slidingTabStrip = (ViewGroup) mTabSocial.getChildAt(0); | |
View tab1 = slidingTabStrip.getChildAt(1); | |
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) tab1.getLayoutParams(); | |
layoutParams.weight = 1.2f; | |
layoutParams.width = 0; | |
tab1.setLayoutParams(layoutParams); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment