Home | History | Annotate | Download | only in qs

Lines Matching defs:viewGroup

24 import android.view.ViewGroup;
36 public class PseudoGridView extends ViewGroup {
138 * Bridges between a ViewGroup and a BaseAdapter.
140 * Usage: {@code ViewGroupAdapterBridge.link(viewGroup, adapter)}
142 * After this call, the ViewGroup's children will be provided by the adapter.
146 private final WeakReference<ViewGroup> mViewGroup;
150 public static void link(ViewGroup viewGroup, BaseAdapter adapter) {
151 new ViewGroupAdapterBridge(viewGroup, adapter);
154 private ViewGroupAdapterBridge(ViewGroup viewGroup, BaseAdapter adapter) {
155 mViewGroup = new WeakReference<>(viewGroup);
166 ViewGroup viewGroup = mViewGroup.get();
167 if (viewGroup == null) {
171 final int childCount = viewGroup.getChildCount();
178 oldView = viewGroup.getChildAt(i);
180 View newView = mAdapter.getView(i, oldView, viewGroup);
183 viewGroup.addView(newView);
186 viewGroup.removeViewAt(i);
187 viewGroup.addView(newView, i);
190 int lastIndex = viewGroup.getChildCount() - 1;
191 viewGroup.removeViewAt(lastIndex);