-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Enhancement] Expose more customization properties for text on tabs #7713
Comments
@Basti82b so I wouldn't call this a bug. The bold text makes it larger so it wraps. Ideally here we'd just have more apis you could use to change the font size so you can adjust the text to fit In the mean time you could implement a custom ShellItemRenderer and change the font settings of the tabs |
@PureWeen Thank you for the pointer. Where can I find "the font settings of the tabs" for Android? Is it right to override OnCreateView? |
Here is my solution:
|
It seems that issue is tracked here: material-components/material-components-android#139 And it seems to be fixed https://issuetracker.google.com/issues/115754572
But I don't know how to use the updated component in Xamarin.Forms app. |
You can control text size using James approach: https://montemagno.com/control-text-size-on-android-bottom-navigation/ |
@pfedotovsky you should be able to pull in Android X https://devblogs.microsoft.com/xamarin/androidx-for-xamarin/ And then use the material packages from there |
@PureWeen I've updated my app to use AndroidX. Could you please elaborate on Material packages I need to use? |
You'll probably have to wait until we up our material dependency There are some style changes we have to address before we can merge that PR though |
@PureWeen thank you for the prompt reply! I've subscribed to the PR. My app currently uses |
@pfedotovsky nope :-) |
@pfedotovsky you could try installing this package to see if that works for you https://www.nuget.org/packages/Xamarin.Google.Android.Material/1.1.0-rc3 |
@PureWeen works perfectly, thank you! Text is no longer cut off in bottom tab titles :) |
Steps to Reproduce
Expected Behavior
Tab title is displayed completely.
Actual Behavior
Tab title is cropped.
Basic Information
Version with issue: Xamarin.Forms 4.2.0.815419
Platform Target Frameworks:
Android: 9.0
Screenshots
The text was updated successfully, but these errors were encountered: