-
-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auto-resize search suggestion text to avoid horizontal cuts on device…
…s with bigger text sizes
- Loading branch information
1 parent
5b58949
commit e4620a4
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
<!-- When users increase the text size in the accessibility settings, the search suggestions | ||
popup cuts the text (it only shows the top half of the letters), because the height of the | ||
"dropdown menu list item" is fixed somewhere. We solve the bug with this override of the style | ||
used by "dropdown list items" such as the search suggestions --> | ||
<style name="ReadableSearchSuggestionListItem" parent="android:Widget.Material.DropDownItem"> | ||
<!-- we force the text to resize in order to fit the fixed height of the list item --> | ||
<item name="android:autoSizeTextType">uniform</item> | ||
<item name="android:autoSizeMinTextSize">1sp</item> | ||
<item name="android:autoSizeStepGranularity">0.1sp</item> | ||
<item name="android:autoSizeMaxTextSize">50sp</item> | ||
</style> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters