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

Commit

Permalink
Replace Shell sans-serif-medium magic string on Android (#15698)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfversluis committed Feb 28, 2023
1 parent 2f66c07 commit 51d8c70
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion Xamarin.Forms.Core/Shell/BaseShellItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ internal static DataTemplate CreateDefaultFlyoutItemCell(string textBinding, str
{
defaultLabelClass.Setters.Add(new Setter { Property = Label.FontSizeProperty, Value = 14 });
defaultLabelClass.Setters.Add(new Setter { Property = Label.TextColorProperty, Value = Color.Black.MultiplyAlpha(0.87) });
defaultLabelClass.Setters.Add(new Setter { Property = Label.FontFamilyProperty, Value = "sans-serif-medium" });
defaultLabelClass.Setters.Add(new Setter { Property = Label.MarginProperty, Value = new Thickness(20, 0, 0, 0) });
}
else if (Device.RuntimePlatform == Device.iOS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void clickCallback(object s, EventArgs e)

using (var text = new TextView(context))
{
text.SetTypeface(Typeface.Create("sans-serif-medium", TypefaceStyle.Normal), TypefaceStyle.Normal);
text.SetTypeface(Typeface.SansSerif, TypefaceStyle.Normal);
text.SetTextColor(AColor.Black);
text.Text = shellContent.title;
lp = new LinearLayout.LayoutParams(0, LP.WrapContent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Collections.Specialized;
using System.ComponentModel;
using Android.Content;
using Android.Graphics;
using Android.Graphics.Drawables;
using Android.OS;
using Android.Views;
Expand Down Expand Up @@ -216,7 +217,7 @@ void clickCallback(object s, EventArgs e)

using (var text = new TextView(Context))
{
text.Typeface = "sans-serif-medium".ToTypeFace();
text.Typeface = Typeface.SansSerif;
text.SetTextColor(AColor.Black);
text.Text = shellContent.Title;
lp = new LinearLayout.LayoutParams(0, LP.WrapContent)
Expand Down

0 comments on commit 51d8c70

Please sign in to comment.