-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
I'm updating an addon library to this library, and it appears the FirebaseListAdapter is using an Activity parameter in the constructor where only a Context is needed. This would help out in situations where a home screen widget uses the adapter but doesn't have access to an Activity.
I say replacing it with a Context is a good idea because we only need it to inflate the layout, and the system already provides a more generalized way to access the layout inflater.
Instead of mActivity.getLayoutInflater().inflate(mLayout, viewGroup, false);
we should do this: LayoutInflater.from(mContext).inflate(mLayout, viewGroup, false); in the FirebaseListAdapter.