The url and title texts in the toolbar of the custom tab was cut off when the font scale of the device is set to the max scaling. This patch fixes it by using the [[ https://developer.android.com/develop/ui/views/text-and-emoji/autosizing-textview | text auto size compat API ]]. The patch also sets a range of values for min and max font scaling which was determined by manual testing. We can no longer use [[ https://developer.android.com/training/multiscreen/screendensities#dips-pels | a formula for scaling ]] since Android 14 now has non-linear font scaling, so we it's important to use something that works well with the dynamic scaling. This results in a small difference in the url as shown below: {F7954301} The final results are as shown below: | description | level 1 | level 2 | level 3 | level 4 | level 5 | level 6 | |--|--|--|--|--|--|--| | before | {F8078443} | {F8078468} | {F8078480} | {F8078487} | {F7954322} | {F7954323} | | after | {F7954331} | {F7954332} | {F7954333}| {F7954335}| {F7954340} | {F7954341} | Try: https://treeherder.mozilla.org/jobs?repo=try&revision=29c521d1fd31a99f000d134a79a9db4bbc5f44b4 Differential Revision: https://phabricator.services.mozilla.com/D222801
Android Components > Browser > Toolbar
A customizable toolbar for browsers.
Usage
Setting up the dependency
Use Gradle to download the library from maven.mozilla.org (Setup repository):
implementation "org.mozilla.components:browser-toolbar:{latest-version}"
Facts
This component emits the following Facts:
| Action | Item | Extras | Description |
|---|---|---|---|
| CLICK | menu | menuExtras |
The user opened the overflow menu. |
| COMMIT | toolbar | commitExtras |
The user has edited the URL. |
menuExtras are additional extras set on the BrowserMenuBuilder passed to the BrowserToolbar (see browser-menu).
commitExtras
| Key | Type | Value |
|---|---|---|
| autocomplete | Boolean | Whether the URL was autocompleted |
| source | String? | Which autocomplete list was used |
License
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/