Skip to content

Commit

Permalink
fix(android): make tabBarVisible work at creation (#13872)
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga authored and hansemannn committed Aug 24, 2023
1 parent f954ae7 commit 5d07f5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,14 @@ public void onLayoutChange(

// Set the ViewPager as a native view.
setNativeView(this.tabGroupViewPager);
if (!TiConvert.toBoolean(this.proxy.getProperty(TiC.PROPERTY_TAB_BAR_VISIBLE), true)) {
TiCompositeLayout.LayoutParams params = new TiCompositeLayout.LayoutParams();
params.autoFillsWidth = true;
params.optionBottom = new TiDimension(0, TiDimension.TYPE_BOTTOM);
this.tabGroupViewPager.setLayoutParams(params);
// FIXME change "500" to a calculate value https://github.com/tidev/titanium-sdk/issues/13900
this.mBottomNavigationView.setTranslationY(500);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ public class TiC
public static final String PROPERTY_SUPPORT_TOOLBAR = "supportToolbar";
public static final String PROPERTY_TABS = "tabs";
public static final String PROPERTY_TAB_OPEN = "tabOpen";
public static final String PROPERTY_TAB_BAR_VISIBLE = "tabBarVisible";
public static final String PROPERTY_TABS_BACKGROUND_COLOR = "tabsBackgroundColor";
public static final String PROPERTY_TABS_BACKGROUND_SELECTED_COLOR = "tabsBackgroundSelectedColor";
public static final String PROPERTY_TAB_MODE = "tabMode";
Expand Down

0 comments on commit 5d07f5c

Please sign in to comment.