Skip to content

Commit

Permalink
Merge pull request #79 from dylanberry/master
Browse files Browse the repository at this point in the history
Fixed null reference exception
  • Loading branch information
muak authored Jan 18, 2020
2 parents 1722a2e + 5d9c264 commit 8256a09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SettingsView.Droid/Cells/CellBaseView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8256a09

Please sign in to comment.