From 50f2a0b09a12191e00c2a9e6e7db894639f70335 Mon Sep 17 00:00:00 2001 From: Satoshi Nakamura Date: Sat, 4 Jul 2020 10:55:46 +0900 Subject: [PATCH] fix degradation #79 --- SettingsView.Droid/Cells/CellBaseView.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SettingsView.Droid/Cells/CellBaseView.cs b/SettingsView.Droid/Cells/CellBaseView.cs index 8d0717b..51ab0ed 100644 --- a/SettingsView.Droid/Cells/CellBaseView.cs +++ b/SettingsView.Droid/Cells/CellBaseView.cs @@ -102,8 +102,9 @@ public CellBaseView(Context context, Cell cell) : base(context) public CellBaseView(IntPtr javaReference,JniHandleOwnership transfer) : base(javaReference, transfer) { } protected virtual void CreateContentView() - { - var contentView = (_Context as FormsAppCompatActivity).LayoutInflater.Inflate(Resource.Layout.CellBaseView, this, true); + { + var layoutInflater = (LayoutInflater)_Context.GetSystemService(Context.LayoutInflaterService); + var contentView = layoutInflater.Inflate(Resource.Layout.CellBaseView, this, true); contentView.LayoutParameters = new ViewGroup.LayoutParams(-1, -1);