Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e3fc8d3 authored by Garfield, Tan's avatar Garfield, Tan
Browse files

Disable view recycling to avoid passing wrong type of view to

Item.bindView().

Bug: 28298672

Change-Id: I1f7442ea3c6287da40b3e5fde25b16c2f2a7b685
parent 4c6cd2b8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -228,10 +228,11 @@ public class RootsFragment extends Fragment {
        }

        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;
            // 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;
        }