Merge "Disable view recycling to avoid passing wrong type of view to Item.bindView()." into nyc-dev
am: a5dd3f3
* commit 'a5dd3f32403deb01ad260d50468f4daf8988ab01':
Disable view recycling to avoid passing wrong type of view to Item.bindView().
Change-Id: Id21f8e5546e28179954e39903baaebf5feff356a
This commit is contained in:
@@ -228,10 +228,11 @@ public class RootsFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public View getView(View convertView, ViewGroup parent) {
|
public View getView(View convertView, ViewGroup parent) {
|
||||||
if (convertView == null) {
|
// Disable recycling views because 1) it's very unlikely a view can be recycled here;
|
||||||
convertView = LayoutInflater.from(parent.getContext())
|
// 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);
|
.inflate(mLayoutId, parent, false);
|
||||||
}
|
|
||||||
bindView(convertView);
|
bindView(convertView);
|
||||||
return convertView;
|
return convertView;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user