Merge "Disable view recycling to avoid passing wrong type of view to Item.bindView()." into nyc-dev am: a5dd3f3

am: b86c38f

* commit 'b86c38f995b2b102e3e44184ac7ce3102cb94dea':
  Disable view recycling to avoid passing wrong type of view to Item.bindView().

Change-Id: I893081c411868d53ad0e7db42712c6defc706a35
This commit is contained in:
Garfield Tan
2016-04-22 23:40:02 +00:00
committed by android-build-merger

View File

@@ -228,10 +228,11 @@ public class RootsFragment extends Fragment {
}
public View getView(View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = LayoutInflater.from(parent.getContext())
// Disable recycling views because 1) it's very unlikely a view can be recycled here;
// 2) there is no easy way for us to know with which layout id the convertView was
// inflated; and 3) simplicity is much appreciated at this time.
convertView = LayoutInflater.from(parent.getContext())
.inflate(mLayoutId, parent, false);
}
bindView(convertView);
return convertView;
}