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

Commit 92a65b23 authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Do not detach headers and footers from the list view."

parents 96d92f19 9b1bb81f
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -4224,7 +4224,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
            // into the scrap heap
            int viewType = lp.viewType;
            if (!shouldRecycleViewType(viewType)) {
                if (viewType != ITEM_VIEW_TYPE_HEADER_OR_FOOTER) {
                    removeDetachedView(scrap, false);
                }
                return;
            }

@@ -4258,9 +4260,11 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te

                    activeViews[i] = null;

                    if (whichScrap == AdapterView.ITEM_VIEW_TYPE_IGNORE) {
                        removeDetachedView(victim, false);
                    if (!shouldRecycleViewType(whichScrap)) {
                        // Do not move views that should be ignored
                        if (whichScrap != ITEM_VIEW_TYPE_HEADER_OR_FOOTER) {
                            removeDetachedView(victim, false);
                        }
                        continue;
                    }