NativeScript/NativeScript

Feature: Allow Android ActionBarItems to be themable...

Open

#9,164 opened on Jan 22, 2021

View on GitHub
 (2 comments) (1 reaction) (0 assignees)TypeScript (23,592 stars) (1,634 forks)batch import
backlogfeaturehelp wanted

Description

At the current point the action bar items are not themable via css because they aren't available to change at runtime. However, a workaround is to use a Spannable String as the title, and then theme that probably using the css value ActionBarItem. See: https://stackoverflow.com/questions/9895472/how-do-i-programmatically-change-actionbar-menuitem-text-colour

Please note: .setTitleCondensed(rawTitle); should be set before setting the .setTitle with the spannable string, so that it works around a bug on Android 4.1 on some phones.

This would be a nice minor feature to add at some point in the future...

Contributor guide