Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28233] Android (Docs): TabGroup's "shiftMode" should be a constant, not boolean value

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterHans Knöchel
AssigneeUnknown
Created2020-11-08T11:29:52.000+0000
Updated2020-11-08T11:34:38.000+0000

Description

The TabGroup's "shiftMode" is a constant, not a boolean value. See the incorrect docs here: http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TabGroup-property-shiftMode Versus the native code (that even handles the UNLABELED constant already - which is awesome): https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUIBottomNavigationTabGroup.java#L173-L185 I understand that it may have been done to "ease" the API here, but evaluating a boolean to an int is not really cool and preventing the actual possible constants isn't either. Two possible ideas here: 1. Rename "shiftMode" to "labelVisibilityMode" and expose the constants, e.g. LABEL_VISIBILITY_MODE_LABELED 2. Keep shift mode a boolean, but expose a cross-platform UNLABELED constant I would suggest (1), because it's the native behavior. "Shift mode" is not very known in the native community, but label visibility modes are a well known Android-only feature, which is fine for Android devs. And the whole labelVisibilityMode property could even be cross-platform, because iOS is able to hide the title label as well (using icon-offsets which we also use).

Comments

No comments

JSON Source