Skip to content

Commit

Permalink
Fixed a crash in TimePickerDialog on android < Q
Browse files Browse the repository at this point in the history
  • Loading branch information
B3nedikt committed Feb 23, 2021
1 parent 9859243 commit 4d1696c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ class ViewPumpAppCompatDelegate @JvmOverloads constructor(
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
LayoutInflater.from(context).createView(context, name, null, attrs)
} else {
LegacyLayoutInflater(context).createViewLegacy(context, name, attrs)

// The old inflater can´t handle ViewStubs
if (name != "ViewStub") {
return LegacyLayoutInflater(context).createViewLegacy(context, name, attrs)
}
return null
}
}
}

0 comments on commit 4d1696c

Please sign in to comment.