Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 36062ea

Browse files
authored
Revert "Replace Shell sans-serif-medium magic string on Android (#15698)" (#15705)
This reverts commit 51d8c70.
1 parent 44b8729 commit 36062ea

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Xamarin.Forms.Core/Shell/BaseShellItem.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ internal static DataTemplate CreateDefaultFlyoutItemCell(string textBinding, str
453453
{
454454
defaultLabelClass.Setters.Add(new Setter { Property = Label.FontSizeProperty, Value = 14 });
455455
defaultLabelClass.Setters.Add(new Setter { Property = Label.TextColorProperty, Value = Color.Black.MultiplyAlpha(0.87) });
456+
defaultLabelClass.Setters.Add(new Setter { Property = Label.FontFamilyProperty, Value = "sans-serif-medium" });
456457
defaultLabelClass.Setters.Add(new Setter { Property = Label.MarginProperty, Value = new Thickness(20, 0, 0, 0) });
457458
}
458459
else if (Device.RuntimePlatform == Device.iOS)

Xamarin.Forms.Platform.Android/Renderers/BottomNavigationViewUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ void clickCallback(object s, EventArgs e)
173173

174174
using (var text = new TextView(context))
175175
{
176-
text.SetTypeface(Typeface.SansSerif, TypefaceStyle.Normal);
176+
text.SetTypeface(Typeface.Create("sans-serif-medium", TypefaceStyle.Normal), TypefaceStyle.Normal);
177177
text.SetTextColor(AColor.Black);
178178
text.Text = shellContent.title;
179179
lp = new LinearLayout.LayoutParams(0, LP.WrapContent)

Xamarin.Forms.Platform.Android/Renderers/ShellItemRenderer.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Collections.Specialized;
44
using System.ComponentModel;
55
using Android.Content;
6-
using Android.Graphics;
76
using Android.Graphics.Drawables;
87
using Android.OS;
98
using Android.Views;
@@ -217,7 +216,7 @@ void clickCallback(object s, EventArgs e)
217216

218217
using (var text = new TextView(Context))
219218
{
220-
text.Typeface = Typeface.SansSerif;
219+
text.Typeface = "sans-serif-medium".ToTypeFace();
221220
text.SetTextColor(AColor.Black);
222221
text.Text = shellContent.Title;
223222
lp = new LinearLayout.LayoutParams(0, LP.WrapContent)

0 commit comments

Comments
 (0)