[TIMOB-27317] Android bottom navigation - support `labelVisibilityMode`
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Critical |
| Status | Closed |
| Resolution | Duplicate |
| Resolution Date | 2020-01-10T00:57:40.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | andorid, tabGroup |
| Reporter | Ophir Oren |
| Assignee | Eric Merriman |
| Created | 2019-06-13T10:23:53.000+0000 |
| Updated | 2020-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.
[~developer82], you can already do this now.
TabGrouphas property [shiftMode](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TabGroup-property-shiftMode) which when set tofalsewill 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.Hi, The property I've described above is not the same thing.
ShiftModeonly acceptstrueorfalseand 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/LabelVisibilityModeI 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.Hello [~developer82], Did you try out the solution by Joshua? Can you follow up here if that works for you now? Thanks.
[~sdarda] I think "shiftMode" also does weird things like zooming, etc. This can probably stay as a new feature request.
Duplicate of TIMOB-26905 - which is now implemented as part of the Android X migration done in TIMOB-26472.
As a fallback you can use
shiftMode = falseand use add adimens.xmlfile with the following content<?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="design_bottom_navigation_active_text_size">12sp</dimen> </resources>