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

Android: calculate TabGroup bottom navigation height properly #13900

Open
1 task done
cb1kenobi opened this issue Aug 19, 2023 · 0 comments
Open
1 task done

Android: calculate TabGroup bottom navigation height properly #13900

cb1kenobi opened this issue Aug 19, 2023 · 0 comments

Comments

@cb1kenobi
Copy link
Contributor

I have searched and made sure there are no existing issues for the issue I am filing

  • I have searched the existing issues

Description

PR #13872 introduced the ability to toggle the visibility of the tab bar, but the height is manually set to 500. It would be nice to be able to programmatically determine the height.

Expected Behavior

Calculate the height instead of using a fixed height of 500.

Actual behavior

Uses a fixed height of 500 instead of the actual height.

Reproducible sample

const isAndroid = Ti.Platform.osname === 'android';
let tabGroup;

const window = Ti.UI.createWindow();

const btn = Ti.UI.createButton({
	title: 'Show / hide tab group'
});

btn.addEventListener('click', () => {
	tabGroup.tabBarVisible = !tabGroup.tabBarVisible;
});

window.add(btn);

tabGroup = Ti.UI.createTabGroup({
	style: isAndroid ? Ti.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION : undefined,
	tabBarVisible: false,    // NEW - will hide it at the beginning
	tabs: [
		Ti.UI.createTab({
			window,
			title: window.title
		})
	]
});

tabGroup.open();

Steps to reproduce

Build & run!

Platform

Android

SDK version you are using

12.3.0

Alloy version you are using

No response

@cb1kenobi cb1kenobi added bug needs triage This issue hasn't been reviewed by maintainers and removed needs triage This issue hasn't been reviewed by maintainers labels Aug 19, 2023
@m1ga m1ga added the android label Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants