Fixed
Status Update
Comments
su...@gmail.com <su...@gmail.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
su...@gmail.com <su...@gmail.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
il...@google.com <il...@google.com> #4
Re #2,3 - We've just published our
Fragment have some existing lint checks in their fragment-lint
project, so some of the steps are already taken care of for you (and the existing Lint checks are a good place to look for code examples and testing strategies).
Thanks for offering to help!
jb...@google.com <jb...@google.com> #6
Thank you for the pull request! This has been added internally and will be a part of the next Fragment alpha release.
a....@gmail.com <a....@gmail.com> #7
I know the ticket is closed but ..
if you call getLayoutInflater from onCreate method (not onCreateDialog) you may have a crash.
because getLayoutInflator goes to onGetLayoutInflater and then it can go to onCreateDialog (even though the entry point is onCreate dialog)
if you call getLayoutInflater from onCreate method (not onCreateDialog) you may have a crash.
because getLayoutInflator goes to onGetLayoutInflater and then it can go to onCreateDialog (even though the entry point is onCreate dialog)
Description
When using a method from
DialogFragment
, if you want to get aLayoutInflater
, you should always call thegetLayoutInflater()
Fragment
.Using can return a
LayoutInflater.from(Context)
LayoutInflater
that does not have the correct theme.It would be nice if there was a lint rule, that caught all calls to
LayoutInflater.from(Context)
and suggested to usegetLayoutInflater()
instead.