Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): make tabBarVisible work at creation #13872

Merged
merged 5 commits into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading