Androidでアクセシビリティフォントのスケーリングを無効にする方法についてはまだ苦労している方にお勧めします。 あなたはこのようにラベル、ボタンと共通の入力コントロールのカスタムレンダラを作成する必要があります。
Xamarinピッカーコントロールの
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: ExportRenderer(typeof(Label), typeof(MyApp.Droid.Renderers.LabelRendererDroid))]
namespace MyApp.Droid.Renderers
{
class LabelRendererDroid : LabelRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Label> e)
{
base.OnElementChanged(e);
if (e.NewElement == null) return;
Control.SetTextSize(Android.Util.ComplexUnitType.Dip, (float)e.NewElement.FontSize);
}
}
}
は一切のFontSizeプロパティが存在しないので、我々は、Appクラスに追加することができます。
public static double NormalFontSize => Device.GetNamedSize(NamedSize.Medium, typeof(Picker));
その後、
とピッカーレンダラでそれを活用:それはAVAないよう
Control.SetTextSize(Android.Util.ComplexUnitType.Dip, (float)App.NormalFontSize);
はまた、このNormalFontSizeプロパティを変更することにより、我々は、ピッカーのためにどんな希望するフォントサイズを設定することができますレンダラーなしでilable。