[TIMOB-25953] Android: Add "Ti.UI.TabbedBar" support
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-01-04T23:28:12.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 8.0.0 |
Components | Android |
Labels | android, parity, tabbedbar |
Reporter | Joshua Quick |
Assignee | Yordan Banev |
Created | 2018-04-10T18:26:06.000+0000 |
Updated | 2019-01-07T11:22:22.000+0000 |
Description
*Summary:*
Currently, Titanium's
TabbedBar
feature is iOS only. We should add support on Android for parity.
This would also be a solution for developers who want to see tabs at the bottom of the Android screen, such as how it works on iOS. The TabbedBar
can be used in conjunction with a ScrollableView
with scrolling disabled to have the same effect as a TabGroup
.
*Recommended Solution:*
Use the Google "design" support library's TabLayout
class which only shows tabs.
https://developer.android.com/reference/android/support/design/widget/TabLayout.html
https://material.io/guidelines/components/tabs.html#tabs-usage
Alternatively, use the Java TabHost
class. The TabHost
content area for the tabbed view can be set with a zero height so that only the tab bar is shown.
https://developer.android.com/reference/android/widget/TabHost.html
The iOS Ti.UI.TabbedGrouped
is currently flagged deprecated. We should un-deprecate it and make the Ti.UI.iOS.TabbedGroup
deprecated instead.
https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TabbedBar
https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iOS.TabbedBar
*Future:*
Google's material design guidelines suggests that you use a BottomNavigationView
if the tabbed bar is shown at the bottom of the screen. It doesn't show an underline for tab selection and instead highlights the text and image. Unfortunately, this solution has a limit on how many tabs can be shown. It doesn't support horizontal scrolling. Perhaps this should be a style setting upon TabbedBar
creation that can be implemented later?
https://developer.android.com/reference/android/support/design/widget/BottomNavigationView.html
https://material.io/guidelines/components/bottom-navigation.html
PR: https://github.com/appcelerator/titanium_mobile/pull/10286
Very excited about this thank you. I am an iOS focussed dev who is wanting to transition my apps to support Android. Parity in Ti of bottom aligned TabGroups across Android / iOS will be super helpful.
Very sorry to see this moved. Hope the priority can be increased on this.
[~mdelmarter], for 7.5.0 (due to time constraints) we're going to focus on improving
TabGroup
instead. This includes add a bottom tabs style to it. Please see: [TIMOB-26354]FR Passed. Waiting for build issues to be fixed to merge.
Thanks for taking this into 8.0.0!
FR Passed. PR Merged.
*Closing ticket.* The feature is present in SDK: {noformat} 8.0.0.v20190104153150 {noformat}