diff --git a/SettingsView.Droid/Cells/CellBaseView.cs b/SettingsView.Droid/Cells/CellBaseView.cs index ebcdb74..d7f87fe 100644 --- a/SettingsView.Droid/Cells/CellBaseView.cs +++ b/SettingsView.Droid/Cells/CellBaseView.cs @@ -99,7 +99,8 @@ public CellBaseView(Context context, Cell cell) : base(context) 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);