I have five tabs (Events
, Groups
, Devices
, Map
, and More
) in a tabgroup
component on Android using Titanium. I don't want the user to have to scroll horizontally to see these tabs on common, larger android devices.
If I can change the minimum width or padding of a tab, they would easily fit and still be plenty large enough to tap on.
I need to change these style attributes on the Titanium component somehow:
android.support.design:tabMinWidth android.support.design:tabPaddingStart
I can't figure out how. I see how to create a theme but I don't see how to modify all tablayout components using a theme.
I see that if I had access to the underlying native component I could change the padding doing something like this:
int tabIndex = 0;
LinearLayout layout = ((LinearLayout)((LinearLayout)mTabLayout.getChildAt(0)).getChildAt(tabIndex));
layout.setPadding(0,0, 0, 0);
But of course I have no idea how I would do that within the Titanium framework.
Any ideas would be appreciated?