Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27317] Android bottom navigation - support `labelVisibilityMode`

GitHub Issuen/a
TypeNew Feature
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2020-01-10T00:57:40.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsandorid, tabGroup
ReporterOphir Oren
AssigneeEric Merriman
Created2019-06-13T10:23:53.000+0000
Updated2020-09-01T07:15:25.000+0000

Description

When creating Android bottom navigation bar (bottom tabs) support the property labelVisibilityMode (Android only) which sets the mode in which labels behavior on the tabs.

Comments

  1. Joshua Quick 2019-06-13

    [~developer82], you can already do this now. TabGroup has property [shiftMode](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TabGroup-property-shiftMode) which when set to false will prevent the bottom tabs from shifting... and... prevent the unselected tab titles from disappearing. I believe this is what you're after. The current behavior where only the selected tab's title is displayed is Google's default behavior.
  2. Ophir Oren 2019-06-23

    Hi, The property I've described above is not the same thing. ShiftMode only accepts true or false and affects the appearance of the entire tab. The property I've suggested affects the text of the tab and accepts multiple possible values as described here: https://developer.android.com/reference/com/google/android/material/bottomnavigation/LabelVisibilityMode
  3. Joshua Quick 2019-06-24

    I understand that. What I'm suggesting is if you need a solution that works "today", then set "shiftMode" to false. That will internally set the label visibility mode so that the tab titles will always appear.
  4. Sharif AbuDarda 2019-07-26

    Hello [~developer82], Did you try out the solution by Joshua? Can you follow up here if that works for you now? Thanks.
  5. Brenton House 2019-08-07

    [~sdarda] I think "shiftMode" also does weird things like zooming, etc. This can probably stay as a new feature request.
  6. Hans Knöchel 2019-12-22

    Duplicate of TIMOB-26905 - which is now implemented as part of the Android X migration done in TIMOB-26472.
  7. David Bankier 2020-09-01

    As a fallback you can use shiftMode = false and use add a dimens.xml file with the following content
       <?xml version="1.0" encoding="utf-8"?>
       <resources>
         <dimen name="design_bottom_navigation_active_text_size">12sp</dimen>
       </resources>
       

JSON Source