Home
last modified time | relevance | path

Searched refs:viewHolder (Results 1 – 19 of 19) sorted by relevance

/frameworks/base/core/java/com/android/internal/widget/
DSimpleItemAnimator.java85 public boolean canReuseUpdatedViewHolder(@NonNull RecyclerView.ViewHolder viewHolder) { in canReuseUpdatedViewHolder() argument
86 return !mSupportsChangeAnimations || viewHolder.isInvalid(); in canReuseUpdatedViewHolder()
90 public boolean animateDisappearance(@NonNull ViewHolder viewHolder, in animateDisappearance() argument
94 View disappearingItemView = viewHolder.itemView; in animateDisappearance()
97 if (!viewHolder.isRemoved() && (oldLeft != newLeft || oldTop != newTop)) { in animateDisappearance()
102 Log.d(TAG, "DISAPPEARING: " + viewHolder + " with view " + disappearingItemView); in animateDisappearance()
104 return animateMove(viewHolder, oldLeft, oldTop, newLeft, newTop); in animateDisappearance()
107 Log.d(TAG, "REMOVED: " + viewHolder + " with view " + disappearingItemView); in animateDisappearance()
109 return animateRemove(viewHolder); in animateDisappearance()
114 public boolean animateAppearance(@NonNull ViewHolder viewHolder, in animateAppearance() argument
[all …]
DViewInfoStore.java163 boolean isInPreLayout(ViewHolder viewHolder) { in isInPreLayout() argument
164 final InfoRecord record = mLayoutHolderMap.get(viewHolder); in isInPreLayout()
223 final ViewHolder viewHolder = mLayoutHolderMap.keyAt(index); in process() local
227 callback.unused(viewHolder); in process()
233 callback.unused(viewHolder); in process()
235 callback.processDisappeared(viewHolder, record.preInfo, record.postInfo); in process()
239 callback.processAppeared(viewHolder, record.preInfo, record.postInfo); in process()
242 callback.processPersistent(viewHolder, record.preInfo, record.postInfo); in process()
245 callback.processDisappeared(viewHolder, record.preInfo, null); in process()
248 callback.processAppeared(viewHolder, record.preInfo, record.postInfo); in process()
[all …]
DRecyclerView.java495 public void processDisappeared(ViewHolder viewHolder, @NonNull ItemHolderInfo info,
497 mRecycler.unscrapView(viewHolder);
498 animateDisappearance(viewHolder, info, postInfo);
501 public void processAppeared(ViewHolder viewHolder,
503 animateAppearance(viewHolder, preInfo, info);
507 public void processPersistent(ViewHolder viewHolder,
509 viewHolder.setIsRecyclable(false);
514 if (mItemAnimator.animateChange(viewHolder, viewHolder, preInfo, postInfo)) {
517 } else if (mItemAnimator.animatePersistence(viewHolder, preInfo, postInfo)) {
522 public void unused(ViewHolder viewHolder) {
[all …]
DDefaultItemAnimator.java664 public boolean canReuseUpdatedViewHolder(@NonNull ViewHolder viewHolder, in canReuseUpdatedViewHolder() argument
666 return !payloads.isEmpty() || super.canReuseUpdatedViewHolder(viewHolder, payloads); in canReuseUpdatedViewHolder()
/frameworks/base/core/java/com/android/internal/widget/helper/
DItemTouchHelper.java361 ViewHolder viewHolder = mSelected;
362 if (viewHolder == null) {
370 moveIfNecessary(viewHolder);
765 private List<ViewHolder> findSwapTargets(ViewHolder viewHolder) { in findSwapTargets() argument
776 final int right = left + viewHolder.itemView.getWidth() + 2 * margin; in findSwapTargets()
777 final int bottom = top + viewHolder.itemView.getHeight() + 2 * margin; in findSwapTargets()
784 if (other == viewHolder.itemView) { in findSwapTargets()
817 void moveIfNecessary(ViewHolder viewHolder) { in moveIfNecessary() argument
825 final float threshold = mCallback.getMoveThreshold(viewHolder); in moveIfNecessary()
828 if (Math.abs(y - viewHolder.itemView.getTop()) < viewHolder.itemView.getHeight() * threshold in moveIfNecessary()
[all …]
/frameworks/opt/chips/src/com/android/ex/chips/
DDropdownChipLayouter.java128 final ViewHolder viewHolder = new ViewHolder(itemView); in bindView() local
149 if (viewHolder.topDivider != null) { in bindView()
150 viewHolder.topDivider.setVisibility(position == 0 ? View.VISIBLE : View.GONE); in bindView()
152 (MarginLayoutParams) viewHolder.topDivider.getLayoutParams(), in bindView()
155 if (viewHolder.bottomDivider != null) { in bindView()
157 (MarginLayoutParams) viewHolder.bottomDivider.getLayoutParams(), in bindView()
175 bindTextToView(displayName, viewHolder.displayNameView); in bindView()
176 bindTextToView(destination, viewHolder.destinationView); in bindView()
177 bindTextToView(destinationType, viewHolder.destinationTypeView); in bindView()
178 bindIconToView(showImage, entry, viewHolder.imageView, type); in bindView()
[all …]
/frameworks/opt/setupwizard/library/recyclerview/test/instrumentation/src/com/android/setupwizardlib/items/
DRecyclerItemAdapterTest.java128 final ItemViewHolder viewHolder = adapter.onCreateViewHolder(parent, R.layout.test_list_item); in testCreateViewHolder() local
129 assertNotNull("Background should be set", viewHolder.itemView.getBackground()); in testCreateViewHolder()
130 assertEquals("foobar", viewHolder.itemView.getTag()); in testCreateViewHolder()
138 final ItemViewHolder viewHolder = in testCreateViewHolderNoBackground() local
140 assertNull("Background should be null", viewHolder.itemView.getBackground()); in testCreateViewHolderNoBackground()
148 final ItemViewHolder viewHolder = in testCreateViewHolderWithExistingBackground() local
150 Drawable background = viewHolder.itemView.getBackground(); in testCreateViewHolderWithExistingBackground()
/frameworks/opt/setupwizard/library/recyclerview/src/com/android/setupwizardlib/
DDividerItemDecoration.java165 protected boolean isDividerAllowedAbove(RecyclerView.ViewHolder viewHolder) { in isDividerAllowedAbove() argument
166 return !(viewHolder instanceof DividedViewHolder) in isDividerAllowedAbove()
167 || ((DividedViewHolder) viewHolder).isDividerAllowedAbove(); in isDividerAllowedAbove()
179 protected boolean isDividerAllowedBelow(RecyclerView.ViewHolder viewHolder) { in isDividerAllowedBelow() argument
180 return !(viewHolder instanceof DividedViewHolder) in isDividerAllowedBelow()
181 || ((DividedViewHolder) viewHolder).isDividerAllowedBelow(); in isDividerAllowedBelow()
/frameworks/base/tests/UiBench/src/com/android/test/uibench/leanback/
DCardPresenter.java49 public void onBindViewHolder(ViewHolder viewHolder, Object item) { in onBindViewHolder() argument
51 ImageCardView cardView = (ImageCardView) viewHolder.view; in onBindViewHolder()
58 public void onUnbindViewHolder(ViewHolder viewHolder) { in onUnbindViewHolder() argument
59 ImageCardView cardView = (ImageCardView) viewHolder.view; in onUnbindViewHolder()
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/
DSupportPreferencesUtil.java189 Object viewHolder = invoke(onCreateViewHolder, preferenceGroupAdapter, listView, type); in setUpPreferencesListView() local
190 if (viewHolder == null) { in setUpPreferencesListView()
194 viewHolder.getClass(), int.class), preferenceGroupAdapter, viewHolder, i); in setUpPreferencesListView() local
198 View itemView = (View) viewHolder.getClass().getField("itemView").get(viewHolder); in setUpPreferencesListView()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/customize/
DTileAdapter.java570 public void onSelectedChanged(ViewHolder viewHolder, int actionState) {
571 super.onSelectedChanged(viewHolder, actionState);
573 viewHolder = null;
575 if (viewHolder == mCurrentDrag) return;
585 if (viewHolder != null) {
586 mCurrentDrag = (Holder) viewHolder;
611 public int getMovementFlags(RecyclerView recyclerView, ViewHolder viewHolder) {
612 switch (viewHolder.getItemViewType()) {
626 public boolean onMove(RecyclerView recyclerView, ViewHolder viewHolder, ViewHolder target) {
627 int from = viewHolder.getAdapterPosition();
[all …]
/frameworks/base/tests/UiBench/src/com/android/test/uibench/recyclerview/
DRvArrayAdapter.java56 public void onBindViewHolder(ViewHolder viewHolder, final int position) { in onBindViewHolder() argument
57 viewHolder.getTextView().setText(mDataSet[position]); in onBindViewHolder()
/frameworks/opt/setupwizard/library/recyclerview/src/com/android/setupwizardlib/items/
DRecyclerItemAdapter.java96 final ItemViewHolder viewHolder = new ItemViewHolder(view); in onCreateViewHolder() local
136 final IItem item = viewHolder.getItem(); in onCreateViewHolder()
143 return viewHolder; in onCreateViewHolder()
/frameworks/base/packages/CarSystemUI/src/com/android/systemui/volume/
DCarVolumeItem.java45 void bind(CarVolumeItemViewHolder viewHolder) { in bind() argument
46 viewHolder.bind(/* carVolumeItem= */ this); in bind()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DScreenDecorWindowTests.java195 final View[] viewHolder = new View[1]; in createWindow() local
211 viewHolder[0] = view; in createWindow()
215 return viewHolder[0]; in createWindow()
/frameworks/opt/setupwizard/library/recyclerview/test/instrumentation/src/com/android/setupwizardlib/test/
DHeaderRecyclerViewTest.java154 public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int i) {} in onBindViewHolder() argument
DSetupWizardRecyclerLayoutTest.java166 public void onBindViewHolder(ViewHolder viewHolder, int position) {} in createTestAdapter() argument
DGlifRecyclerLayoutTest.java163 public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {} in createTestAdapter() argument
DDividerItemDecorationTest.java168 public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int i) {} in drawDecoration()