NativeScript / NativeScript/NativeScript
Feature: Allow Android ActionBarItems to be themable...
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.7k
- Forks
- 1.7k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 35
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue identifies Android ActionBarItems and the CSS value ActionBarItem; begin by locating the Android ActionBarItem implementation and its runtime title setup around setTitleCondensed and setTitle. Done means ActionBarItems can be themed through CSS at runtime while preserving the Android 4.1 ordering workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, css
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100