Searched refs:oldItem (Results 1 - 25 of 28) sorted by relevance

12

/frameworks/support/leanback/src/main/java/androidx/leanback/widget/
H A DGuidedActionDiffCallback.java39 public boolean areItemsTheSame(@NonNull GuidedAction oldItem, @NonNull GuidedAction newItem) { argument
40 if (oldItem == null) {
45 return oldItem.getId() == newItem.getId();
49 public boolean areContentsTheSame(@NonNull GuidedAction oldItem, argument
51 if (oldItem == null) {
56 return oldItem.getCheckSetId() == newItem.getCheckSetId()
57 && oldItem.mActionFlags == newItem.mActionFlags
58 && TextUtils.equals(oldItem.getTitle(), newItem.getTitle())
59 && TextUtils.equals(oldItem.getDescription(), newItem.getDescription())
60 && oldItem
[all...]
H A DDiffCallback.java41 * @param oldItem The item in the old list.
46 public abstract boolean areItemsTheSame(@NonNull Value oldItem, @NonNull Value newItem); argument
52 * @param oldItem The item in the old list.
57 public abstract boolean areContentsTheSame(@NonNull Value oldItem, @NonNull Value newItem); argument
65 public Object getChangePayload(@NonNull Value oldItem, @NonNull Value newItem) { argument
/frameworks/support/paging/runtime/src/main/java/androidx/paging/
H A DPagedStorageDiffHelper.java41 T oldItem = oldList.get(oldItemPosition + oldOffset);
43 if (oldItem == null || newItem == null) {
46 return diffCallback.getChangePayload(oldItem, newItem);
61 T oldItem = oldList.get(oldItemPosition + oldOffset);
63 if (oldItem == newItem) {
67 if (oldItem == null || newItem == null) {
70 return diffCallback.areItemsTheSame(oldItem, newItem);
75 T oldItem = oldList.get(oldItemPosition + oldOffset);
77 if (oldItem == newItem) {
81 if (oldItem
[all...]
/frameworks/support/v7/recyclerview/src/main/java/androidx/recyclerview/widget/
H A DAsyncListDiffer.java234 T oldItem = oldList.get(oldItemPosition);
236 if (oldItem != null && newItem != null) {
237 return mConfig.getDiffCallback().areItemsTheSame(oldItem, newItem);
240 return oldItem == null && newItem == null;
245 T oldItem = oldList.get(oldItemPosition);
247 if (oldItem != null && newItem != null) {
248 return mConfig.getDiffCallback().areContentsTheSame(oldItem, newItem);
250 if (oldItem == null && newItem == null) {
263 T oldItem = oldList.get(oldItemPosition);
265 if (oldItem !
[all...]
H A DSimpleItemAnimator.java311 * @param oldItem true if this is the old item that was changed, false if
315 public final void dispatchChangeFinished(RecyclerView.ViewHolder item, boolean oldItem) { argument
316 onChangeFinished(item, oldItem);
353 * @param oldItem true if this is the old item that was changed, false if
356 public final void dispatchChangeStarting(RecyclerView.ViewHolder item, boolean oldItem) { argument
357 onChangeStarting(item, oldItem);
436 * @param oldItem true if this is the old item that was changed, false if
440 public void onChangeStarting(RecyclerView.ViewHolder item, boolean oldItem) { argument
450 * @param oldItem true if this is the old item that was changed, false if
453 public void onChangeFinished(RecyclerView.ViewHolder item, boolean oldItem) { argument
[all...]
H A DSortedList.java298 T oldItem = mOldData[mOldDataStart];
301 int result = mCallback.compare(oldItem, newItem);
307 if (!mCallback.areItemsTheSame(oldItem, newItem)) {
316 if (!mCallback.areContentsTheSame(oldItem, newItem)) {
320 mCallback.getChangePayload(oldItem, newItem));
441 T oldItem = mOldData[mOldDataStart];
443 int compare = mCallback.compare(oldItem, newItem);
450 } else if (compare == 0 && mCallback.areItemsTheSame(oldItem, newItem)) {
455 if (!mCallback.areContentsTheSame(oldItem, newItem)) {
457 mCallback.getChangePayload(oldItem, newIte
887 areContentsTheSame(T2 oldItem, T2 newItem) argument
987 areContentsTheSame(T2 oldItem, T2 newItem) argument
[all...]
H A DDefaultItemAnimator.java419 boolean oldItem = false;
424 oldItem = true;
431 dispatchChangeFinished(item, oldItem);
H A DDiffUtil.java329 * oldItem
376 * @param oldItem The item in the old list.
382 public abstract boolean areItemsTheSame(@NonNull T oldItem, @NonNull T newItem); argument
402 * @param oldItem The item in the old list.
408 public abstract boolean areContentsTheSame(@NonNull T oldItem, @NonNull T newItem); argument
426 public Object getChangePayload(@NonNull T oldItem, @NonNull T newItem) { argument
/frameworks/support/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/
H A DItem.java50 public boolean areContentsTheSame(@NonNull Item oldItem, @NonNull Item newItem) {
51 return oldItem.equals(newItem);
55 public boolean areItemsTheSame(@NonNull Item oldItem, @NonNull Item newItem) {
56 return oldItem.id == newItem.id;
/frameworks/support/leanback/src/androidTest/java/androidx/leanback/widget/
H A DObjectAdapterTest.java163 public boolean areItemsTheSame(AdapterItem oldItem, AdapterItem newItem) { argument
164 return oldItem.getId() == newItem.getId();
169 public boolean areContentsTheSame(AdapterItem oldItem, AdapterItem newItem) { argument
170 return oldItem.equals(newItem);
175 public Object getChangePayload(AdapterItem oldItem, argument
178 if (oldItem.getId() != newItem.getId()) {
182 if (!oldItem.getStringMemberOne().equals(newItem.getStringMemberOne())) {
186 if (!oldItem.getStringMemberTwo().equals(newItem.getStringMemberTwo())) {
190 if (!oldItem.getNotRelatedStringMember().equals(newItem.getNotRelatedStringMember())) {
262 public boolean areItemsTheSame(AdapterItem oldItem, AdapterIte
[all...]
/frameworks/support/paging/runtime/src/androidTest/java/androidx/paging/
H A DPagedStorageDiffHelperTest.kt101 override fun areItemsTheSame(oldItem: String, newItem: String): Boolean {
103 return oldItem[0] == newItem[0]
106 override fun areContentsTheSame(oldItem: String, newItem: String): Boolean {
107 return oldItem == newItem
H A DAsyncPagedListDifferTest.kt323 override fun areItemsTheSame(oldItem: String, newItem: String): Boolean {
324 return oldItem == newItem
327 override fun areContentsTheSame(oldItem: String, newItem: String): Boolean {
328 return oldItem == newItem
/frameworks/support/frameworks/support/samples/SupportLeanbackDemos/src/main/java/com/example/android/leanback/
H A DSearchFragment.java54 public boolean areItemsTheSame(PhotoItem oldItem, PhotoItem newItem) {
55 return oldItem.getId() == newItem.getId();
61 public boolean areContentsTheSame(PhotoItem oldItem, PhotoItem newItem) {
62 return oldItem.equals(newItem);
67 public Object getChangePayload(PhotoItem oldItem, PhotoItem newItem) {
69 if (oldItem.getImageResourceId()
74 if (oldItem.getTitle() != null && newItem.getTitle() != null
75 && !oldItem.getTitle().equals(newItem.getTitle())) {
79 if (oldItem.getContent() != null && newItem.getContent() != null
80 && !oldItem
[all...]
H A DSearchSupportFragment.java57 public boolean areItemsTheSame(PhotoItem oldItem, PhotoItem newItem) {
58 return oldItem.getId() == newItem.getId();
64 public boolean areContentsTheSame(PhotoItem oldItem, PhotoItem newItem) {
65 return oldItem.equals(newItem);
70 public Object getChangePayload(PhotoItem oldItem, PhotoItem newItem) {
72 if (oldItem.getImageResourceId()
77 if (oldItem.getTitle() != null && newItem.getTitle() != null
78 && !oldItem.getTitle().equals(newItem.getTitle())) {
82 if (oldItem.getContent() != null && newItem.getContent() != null
83 && !oldItem
[all...]
/frameworks/support/samples/SupportLeanbackDemos/src/main/java/com/example/android/leanback/
H A DSearchFragment.java54 public boolean areItemsTheSame(PhotoItem oldItem, PhotoItem newItem) {
55 return oldItem.getId() == newItem.getId();
61 public boolean areContentsTheSame(PhotoItem oldItem, PhotoItem newItem) {
62 return oldItem.equals(newItem);
67 public Object getChangePayload(PhotoItem oldItem, PhotoItem newItem) {
69 if (oldItem.getImageResourceId()
74 if (oldItem.getTitle() != null && newItem.getTitle() != null
75 && !oldItem.getTitle().equals(newItem.getTitle())) {
79 if (oldItem.getContent() != null && newItem.getContent() != null
80 && !oldItem
[all...]
H A DSearchSupportFragment.java57 public boolean areItemsTheSame(PhotoItem oldItem, PhotoItem newItem) {
58 return oldItem.getId() == newItem.getId();
64 public boolean areContentsTheSame(PhotoItem oldItem, PhotoItem newItem) {
65 return oldItem.equals(newItem);
70 public Object getChangePayload(PhotoItem oldItem, PhotoItem newItem) {
72 if (oldItem.getImageResourceId()
77 if (oldItem.getTitle() != null && newItem.getTitle() != null
78 && !oldItem.getTitle().equals(newItem.getTitle())) {
82 if (oldItem.getContent() != null && newItem.getContent() != null
83 && !oldItem
[all...]
/frameworks/base/core/java/com/android/internal/widget/
H A DSimpleItemAnimator.java312 * @param oldItem true if this is the old item that was changed, false if
316 public final void dispatchChangeFinished(ViewHolder item, boolean oldItem) { argument
317 onChangeFinished(item, oldItem);
354 * @param oldItem true if this is the old item that was changed, false if
357 public final void dispatchChangeStarting(ViewHolder item, boolean oldItem) { argument
358 onChangeStarting(item, oldItem);
437 * @param oldItem true if this is the old item that was changed, false if
441 public void onChangeStarting(ViewHolder item, boolean oldItem) { argument
451 * @param oldItem true if this is the old item that was changed, false if
454 public void onChangeFinished(ViewHolder item, boolean oldItem) { argument
[all...]
H A DDefaultItemAnimator.java420 boolean oldItem = false;
425 oldItem = true;
432 dispatchChangeFinished(item, oldItem);
/frameworks/support/v7/recyclerview/src/androidTest/java/androidx/recyclerview/widget/
H A DAsyncListDifferTest.kt294 override fun areItemsTheSame(oldItem: String, newItem: String): Boolean {
296 return oldItem[0] == newItem[0]
299 override fun areContentsTheSame(oldItem: String, newItem: String): Boolean {
300 return oldItem == newItem
303 override fun getChangePayload(oldItem: String, newItem: String): Any? {
304 if (newItem.startsWith(oldItem)) {
306 return newItem.subSequence(oldItem.length, newItem.length)
H A DDummyItemAnimator.java153 public void onChangeStarting(RecyclerView.ViewHolder item, boolean oldItem) { argument
154 CountDownLatch latch = mCountDownLatches[oldItem ? CHANGE_OLD_START : CHANGE_NEW_START];
185 public void onChangeFinished(RecyclerView.ViewHolder item, boolean oldItem) { argument
186 CountDownLatch latch = mCountDownLatches[oldItem
/frameworks/base/core/java/com/android/internal/view/menu/
H A DBaseMenuPresenter.java96 final MenuItemImpl oldItem = convertView instanceof MenuView.ItemView ?
99 if (item != oldItem) {
/frameworks/support/frameworks/support/samples/Support7Demos/src/main/java/com/example/android/supportv7/util/
H A DSortedListActivity.java99 public boolean areContentsTheSame(Item oldItem,
101 return oldItem.mText.equals(newItem.mText);
/frameworks/support/samples/Support7Demos/src/main/java/com/example/android/supportv7/util/
H A DSortedListActivity.java99 public boolean areContentsTheSame(Item oldItem,
101 return oldItem.mText.equals(newItem.mText);
/frameworks/support/v7/appcompat/src/main/java/androidx/appcompat/view/menu/
H A DBaseMenuPresenter.java103 final MenuItemImpl oldItem = convertView instanceof MenuView.ItemView ?
106 if (item != oldItem) {
/frameworks/support/leanback/src/androidTest/java/androidx/leanback/app/
H A DGuidedStepFragmentTest.java480 public void onChangeStarting(RecyclerView.ViewHolder item, boolean oldItem) {
481 if (!oldItem) {
484 super.onChangeStarting(item, oldItem);

Completed in 1305 milliseconds

12