Home
last modified time | relevance | path

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

123

/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
DItemBridgeAdapter.java37 public void onCreate(ViewHolder viewHolder) { in onCreate() argument
39 public void onBind(ViewHolder viewHolder) { in onBind() argument
41 public void onUnbind(ViewHolder viewHolder) { in onUnbind() argument
43 public void onAttachedToWindow(ViewHolder viewHolder) { in onAttachedToWindow() argument
45 public void onDetachedFromWindow(ViewHolder viewHolder) { in onDetachedFromWindow() argument
272 protected void onCreate(ViewHolder viewHolder) { in onCreate() argument
278 protected void onBind(ViewHolder viewHolder) { in onBind() argument
284 protected void onUnbind(ViewHolder viewHolder) { in onUnbind() argument
290 protected void onAttachedToWindow(ViewHolder viewHolder) { in onAttachedToWindow() argument
296 protected void onDetachedFromWindow(ViewHolder viewHolder) { in onDetachedFromWindow() argument
[all …]
DFullWidthDetailsOverviewRowPresenter.java123 ActionsItemBridgeAdapter(FullWidthDetailsOverviewRowPresenter.ViewHolder viewHolder) { in ActionsItemBridgeAdapter() argument
124 mViewHolder = viewHolder; in ActionsItemBridgeAdapter()
155 public void onAttachedToWindow(ItemBridgeAdapter.ViewHolder viewHolder) { in onAttachedToWindow() argument
157 viewHolder.itemView.removeOnLayoutChangeListener(mViewHolder.mLayoutChangeListener); in onAttachedToWindow()
158 viewHolder.itemView.addOnLayoutChangeListener(mViewHolder.mLayoutChangeListener); in onAttachedToWindow()
161 public void onDetachedFromWindow(ItemBridgeAdapter.ViewHolder viewHolder) { in onDetachedFromWindow() argument
162 viewHolder.itemView.removeOnLayoutChangeListener(mViewHolder.mLayoutChangeListener); in onDetachedFromWindow()
294 RecyclerView.ViewHolder viewHolder; in checkFirstAndLastPosition() local
296 viewHolder = mActionsRow.findViewHolderForPosition(mNumItems - 1); in checkFirstAndLastPosition()
297 boolean showRight = (viewHolder == null || in checkFirstAndLastPosition()
[all …]
DRowHeaderPresenter.java89 ViewHolder viewHolder = new ViewHolder(headerView); in onCreateViewHolder() local
90 viewHolder.mOriginalTextColor = headerView.getCurrentTextColor(); in onCreateViewHolder()
91 viewHolder.mUnselectAlpha = parent.getResources().getFraction( in onCreateViewHolder()
94 setSelectLevel(viewHolder, 0); in onCreateViewHolder()
96 return viewHolder; in onCreateViewHolder()
100 public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) { in onBindViewHolder() argument
103 ((RowHeaderView) viewHolder.view).setText(null); in onBindViewHolder()
104 viewHolder.view.setContentDescription(null); in onBindViewHolder()
106 viewHolder.view.setVisibility(View.GONE); in onBindViewHolder()
109 viewHolder.view.setVisibility(View.VISIBLE); in onBindViewHolder()
[all …]
DDetailsOverviewLogoPresenter.java111 public void setContext(ViewHolder viewHolder, in setContext() argument
114 viewHolder.mParentViewHolder = parentViewHolder; in setContext()
115 viewHolder.mParentPresenter = parentPresenter; in setContext()
126 public boolean isBoundToImage(ViewHolder viewHolder, DetailsOverviewRow row) { in isBoundToImage() argument
138 public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) { in onBindViewHolder() argument
140 ImageView imageView = ((ImageView) viewHolder.view); in onBindViewHolder()
142 if (isBoundToImage((ViewHolder) viewHolder, row)) { in onBindViewHolder()
143 ViewHolder vh = (ViewHolder) viewHolder; in onBindViewHolder()
172 public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) { in onUnbindViewHolder() argument
DVerticalGridPresenter.java35 protected void onCreate(ItemBridgeAdapter.ViewHolder viewHolder) { in onCreate() argument
36 if (viewHolder.itemView instanceof ViewGroup) { in onCreate()
37 TransitionHelper.setTransitionGroup((ViewGroup) viewHolder.itemView, in onCreate()
41 mShadowOverlayHelper.onViewCreated(viewHolder.itemView); in onCreate()
64 public void onUnbind(ItemBridgeAdapter.ViewHolder viewHolder) { in onUnbind() argument
66 viewHolder.mHolder.view.setOnClickListener(null); in onUnbind()
71 public void onAttachedToWindow(ItemBridgeAdapter.ViewHolder viewHolder) { in onAttachedToWindow() argument
72 viewHolder.itemView.setActivated(true); in onAttachedToWindow()
334 public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) { in onBindViewHolder() argument
336 ViewHolder vh = (ViewHolder) viewHolder; in onBindViewHolder()
[all …]
DActionPresenterSelector.java67 public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) { in onBindViewHolder() argument
69 ActionViewHolder vh = (ActionViewHolder) viewHolder; in onBindViewHolder()
75 public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) { in onUnbindViewHolder() argument
76 ((ActionViewHolder) viewHolder).mAction = null; in onUnbindViewHolder()
89 public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) { in onBindViewHolder() argument
91 ActionViewHolder vh = (ActionViewHolder) viewHolder; in onBindViewHolder()
124 public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) { in onUnbindViewHolder() argument
125 ActionViewHolder vh = (ActionViewHolder) viewHolder; in onUnbindViewHolder()
DControlButtonPresenterSelector.java93 public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) { in onBindViewHolder() argument
95 ActionViewHolder vh = (ActionViewHolder) viewHolder; in onBindViewHolder()
114 public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) { in onUnbindViewHolder() argument
115 ActionViewHolder vh = (ActionViewHolder) viewHolder; in onUnbindViewHolder()
124 public void setOnClickListener(Presenter.ViewHolder viewHolder, in setOnClickListener() argument
126 ((ActionViewHolder) viewHolder).mFocusableView.setOnClickListener(listener); in setOnClickListener()
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/
DSimpleItemAnimator.java71 public boolean canReuseUpdatedViewHolder(@NonNull RecyclerView.ViewHolder viewHolder) { in canReuseUpdatedViewHolder() argument
72 return !mSupportsChangeAnimations || viewHolder.isInvalid(); in canReuseUpdatedViewHolder()
76 public boolean animateDisappearance(@NonNull ViewHolder viewHolder, in animateDisappearance() argument
80 View disappearingItemView = viewHolder.itemView; in animateDisappearance()
83 if (!viewHolder.isRemoved() && (oldLeft != newLeft || oldTop != newTop)) { in animateDisappearance()
88 Log.d(TAG, "DISAPPEARING: " + viewHolder + " with view " + disappearingItemView); in animateDisappearance()
90 return animateMove(viewHolder, oldLeft, oldTop, newLeft, newTop); in animateDisappearance()
93 Log.d(TAG, "REMOVED: " + viewHolder + " with view " + disappearingItemView); in animateDisappearance()
95 return animateRemove(viewHolder); in animateDisappearance()
100 public boolean animateAppearance(@NonNull ViewHolder viewHolder, in animateAppearance() argument
[all …]
DViewInfoStore.java164 boolean isInPreLayout(ViewHolder viewHolder) { in isInPreLayout() argument
165 final InfoRecord record = mLayoutHolderMap.get(viewHolder); in isInPreLayout()
224 final ViewHolder viewHolder = mLayoutHolderMap.keyAt(index); in process() local
228 callback.unused(viewHolder); in process()
234 callback.unused(viewHolder); in process()
236 callback.processDisappeared(viewHolder, record.preInfo, record.postInfo); in process()
240 callback.processAppeared(viewHolder, record.preInfo, record.postInfo); in process()
243 callback.processPersistent(viewHolder, record.preInfo, record.postInfo); in process()
246 callback.processDisappeared(viewHolder, record.preInfo, null); in process()
249 callback.processAppeared(viewHolder, record.preInfo, record.postInfo); in process()
[all …]
/frameworks/support/samples/Support7Demos/src/com/example/android/supportv7/widget/touch/
DItemTouchHelperActivity.java107 RecyclerView.ViewHolder viewHolder) { in createCallback()
108 return ItemTouchHelperActivity.this.getMovementFlags(recyclerView, viewHolder); in createCallback()
112 public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, in createCallback() argument
114 mAdapter.move(viewHolder.getAdapterPosition(), target.getAdapterPosition()); in createCallback()
119 public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { in createCallback() argument
120 mAdapter.delete(viewHolder.getAdapterPosition()); in createCallback()
124 public void onSelectedChanged(RecyclerView.ViewHolder viewHolder, int actionState) { in createCallback() argument
125 super.onSelectedChanged(viewHolder, actionState); in createCallback()
126 ItemTouchHelperActivity.this.onSelectedChanged(viewHolder, actionState); in createCallback()
131 RecyclerView.ViewHolder viewHolder, in createCallback() argument
[all …]
DSwipeToDismissActivity.java97 public void onBind(ItemTouchViewHolder viewHolder) { in onBind() argument
98 super.onBind(viewHolder); in onBind()
99 viewHolder.actionButton.setVisibility(mPointerSwipeEnabled ? View.GONE : View.VISIBLE); in onBind()
103 public void clearView(RecyclerView.ViewHolder viewHolder) { in clearView() argument
104 super.clearView(viewHolder); in clearView()
105 ItemTouchViewHolder touchVH = (ItemTouchViewHolder) viewHolder; in clearView()
112 public void onSelectedChanged(RecyclerView.ViewHolder viewHolder, int actionState) { in onSelectedChanged() argument
113 ItemTouchViewHolder touchVH = (ItemTouchViewHolder) viewHolder; in onSelectedChanged()
118 touchVH.overlay.setTranslationX(viewHolder.itemView.getWidth()); in onSelectedChanged()
122 super.onSelectedChanged(viewHolder, actionState); in onSelectedChanged()
[all …]
DDragAndDropActivity.java83 public void onBind(ItemTouchViewHolder viewHolder) {
84 super.onBind(viewHolder);
85 viewHolder.actionButton.setVisibility(mLongPressDragEnabled ? View.GONE : View.VISIBLE);
89 public void clearView(RecyclerView.ViewHolder viewHolder) {
90 super.clearView(viewHolder);
91 ItemTouchViewHolder touchVH = (ItemTouchViewHolder) viewHolder;
97 public void onSelectedChanged(RecyclerView.ViewHolder viewHolder, int actionState) {
98 ItemTouchViewHolder touchVH = (ItemTouchViewHolder) viewHolder;
102 super.onSelectedChanged(viewHolder, actionState);
122 public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/
DBaseRecyclerViewAnimationsTest.java170 for (RecyclerView.ViewHolder viewHolder : getTestRecyclerView().collectViewHolders()) { in validateClearedOldPositions()
172 RecyclerView.NO_POSITION, viewHolder.mOldPosition); in validateClearedOldPositions()
174 RecyclerView.NO_POSITION, viewHolder.mPreLayoutPosition); in validateClearedOldPositions()
183 for (RecyclerView.ViewHolder viewHolder : getTestRecyclerView().collectViewHolders()) { in validateOldPositions()
184 if (!viewHolder.isRemoved() && !viewHolder.isInvalid()) { in validateOldPositions()
186 viewHolder.mOldPosition != RecyclerView.NO_POSITION); in validateOldPositions()
506 static CollectPositionResult fromScrap(RecyclerView.ViewHolder viewHolder) { in fromScrap() argument
508 cpr.scrapResult = viewHolder; in fromScrap()
512 static CollectPositionResult fromAdapter(RecyclerView.ViewHolder viewHolder) { in fromAdapter() argument
514 cpr.adapterResult = viewHolder; in fromAdapter()
[all …]
DLoggingItemAnimator.java46 public boolean contains(RecyclerView.ViewHolder viewHolder, in contains() argument
49 if (log.viewHolder == viewHolder) { in contains()
53 if (((AnimateChange) log).newHolder == viewHolder) { in contains()
64 @NonNull RecyclerView.ViewHolder viewHolder, in recordPreLayoutInformation() argument
67 … loggingInfo = new BaseRecyclerViewAnimationsTest.LoggingInfo(viewHolder, changeFlags, payloads); in recordPreLayoutInformation()
74 @NonNull RecyclerView.ViewHolder viewHolder) { in recordPostLayoutInformation() argument
76 loggingInfo = new BaseRecyclerViewAnimationsTest.LoggingInfo(viewHolder, 0, null); in recordPostLayoutInformation()
82 public boolean animateDisappearance(@NonNull RecyclerView.ViewHolder viewHolder, in animateDisappearance() argument
85 .add(new AnimateDisappearance(viewHolder, in animateDisappearance()
88 return super.animateDisappearance(viewHolder, preLayoutInfo, postLayoutInfo); in animateDisappearance()
[all …]
DItemAnimatorV2ApiTest.java103 public boolean canReUse(RecyclerView.ViewHolder viewHolder, List<Object> payloads) { in changeMovedOutsideWithPredictiveAndTwoViewHolders()
104 return viewHolder == singleItemTarget; in changeMovedOutsideWithPredictiveAndTwoViewHolders()
197 assertSame(vh, log.viewHolder); in simpleAdd()
222 assertSame(vh, log.viewHolder); in simpleRemove()
246 assertSame(vh, log.viewHolder); in simpleUpdate()
269 public boolean canReUse(RecyclerView.ViewHolder viewHolder, List<Object> payloads) { in updateWithDuplicateViewHolder()
270 assertSame(viewHolder, vh); in updateWithDuplicateViewHolder()
281 assertSame(vh, log.viewHolder); in updateWithDuplicateViewHolder()
307 public boolean canReUse(RecyclerView.ViewHolder viewHolder, List<Object> payloads) { in updateWithOneDuplicateAndOneInPlace()
308 if (viewHolder == replaced) { in updateWithOneDuplicateAndOneInPlace()
[all …]
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/dirlist/
DDirectoryItemAnimator.java57 mRunningAnimations.put(anim.viewHolder, anim); in runPendingAnimations()
68 if (anim.viewHolder == vh) { in endAnimation()
83 RecyclerView.ViewHolder viewHolder, in recordPreLayoutInformation() argument
87 viewHolder, changeFlags, payloads); in recordPreLayoutInformation()
88 info.isActivated = viewHolder.itemView.isActivated(); in recordPreLayoutInformation()
95 RecyclerView.State state, RecyclerView.ViewHolder viewHolder) { in recordPostLayoutInformation() argument
97 viewHolder); in recordPostLayoutInformation()
98 info.isActivated = viewHolder.itemView.isActivated(); in recordPostLayoutInformation()
145 final RecyclerView.ViewHolder viewHolder; field in DirectoryItemAnimator.ColorAnimation
150 viewHolder = vh; in ColorAnimation()
[all …]
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/helper/
DItemTouchHelper.java367 ViewHolder viewHolder = mSelected;
368 if (viewHolder == null) {
376 moveIfNecessary(viewHolder);
771 private List<ViewHolder> findSwapTargets(ViewHolder viewHolder) { in findSwapTargets() argument
782 final int right = left + viewHolder.itemView.getWidth() + 2 * margin; in findSwapTargets()
783 final int bottom = top + viewHolder.itemView.getHeight() + 2 * margin; in findSwapTargets()
790 if (other == viewHolder.itemView) { in findSwapTargets()
823 private void moveIfNecessary(ViewHolder viewHolder) { in moveIfNecessary() argument
831 final float threshold = mCallback.getMoveThreshold(viewHolder); in moveIfNecessary()
834 if (Math.abs(y - viewHolder.itemView.getTop()) < viewHolder.itemView.getHeight() * threshold in moveIfNecessary()
[all …]
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/helper/
DItemTouchHelperTest.java184 public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, in onMove() argument
186 mMoveRecordList.add(new MoveRecord(viewHolder, target)); in onMove()
191 public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { in onSwiped() argument
192 mSwipeRecords.add(new SwipeRecord(viewHolder, direction)); in onSwiped()
205 public void clearView(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) { in clearView() argument
206 super.clearView(recyclerView, viewHolder); in clearView()
207 mCleared.add(viewHolder); in clearView()
212 if (swipe.viewHolder == vh) { in getSwipe()
233 RecyclerView.ViewHolder viewHolder; field in ItemTouchHelperTest.SwipeRecord
237 public SwipeRecord(RecyclerView.ViewHolder viewHolder, int dir) { in SwipeRecord() argument
[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/support/samples/SupportLeanbackShowcase/app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/app/details/
DDetailsDescriptionPresenter.java46 @Override public void onBindViewHolder(ViewHolder viewHolder, Object item) { in onBindViewHolder() argument
47 TextView primaryText = mResourceCache.getViewById(viewHolder.view, R.id.primary_text); in onBindViewHolder()
48 TextView sndText1 = mResourceCache.getViewById(viewHolder.view, R.id.secondary_text_first); in onBindViewHolder()
49 TextView sndText2 = mResourceCache.getViewById(viewHolder.view, R.id.secondary_text_second); in onBindViewHolder()
50 TextView extraText = mResourceCache.getViewById(viewHolder.view, R.id.extra_text); in onBindViewHolder()
59 @Override public void onUnbindViewHolder(ViewHolder viewHolder) { in onUnbindViewHolder() argument
/frameworks/support/samples/Support7Demos/src/com/example/android/supportv7/widget/
DListPopupWindowActivity.java97 ViewHolder viewHolder = new ViewHolder(); in onCreate()
98 viewHolder.title = (TextView) convertView.findViewById(R.id.title); in onCreate()
99 viewHolder.shortcut = in onCreate()
101 convertView.setTag(viewHolder); in onCreate()
104 ViewHolder viewHolder = (ViewHolder) convertView.getTag(); in onCreate()
105 viewHolder.title.setText(POPUP_CONTENT[position]); in onCreate()
106 viewHolder.shortcut.setVisibility(View.GONE); in onCreate()
/frameworks/support/v17/leanback/src/android/support/v17/leanback/app/
DHeadersSupportFragment.java58 void onHeaderClicked(RowHeaderPresenter.ViewHolder viewHolder, Row row); in onHeaderClicked() argument
71 void onHeaderSelected(RowHeaderPresenter.ViewHolder viewHolder, Row row); in onHeaderSelected() argument
105 void onRowSelected(RecyclerView parent, RecyclerView.ViewHolder viewHolder, in onRowSelected() argument
108 if (viewHolder != null && position >= 0) { in onRowSelected()
109 ItemBridgeAdapter.ViewHolder vh = (ItemBridgeAdapter.ViewHolder) viewHolder; in onRowSelected()
121 public void onCreate(final ItemBridgeAdapter.ViewHolder viewHolder) {
122 View headerView = viewHolder.getViewHolder().view;
128 (RowHeaderPresenter.ViewHolder) viewHolder.getViewHolder(),
129 (Row) viewHolder.getItem());
134 viewHolder.itemView.addOnLayoutChangeListener(sLayoutChangeListener);
DHeadersFragment.java56 void onHeaderClicked(RowHeaderPresenter.ViewHolder viewHolder, Row row); in onHeaderClicked() argument
69 void onHeaderSelected(RowHeaderPresenter.ViewHolder viewHolder, Row row); in onHeaderSelected() argument
103 void onRowSelected(RecyclerView parent, RecyclerView.ViewHolder viewHolder, in onRowSelected() argument
106 if (viewHolder != null && position >= 0) { in onRowSelected()
107 ItemBridgeAdapter.ViewHolder vh = (ItemBridgeAdapter.ViewHolder) viewHolder; in onRowSelected()
119 public void onCreate(final ItemBridgeAdapter.ViewHolder viewHolder) {
120 View headerView = viewHolder.getViewHolder().view;
126 (RowHeaderPresenter.ViewHolder) viewHolder.getViewHolder(),
127 (Row) viewHolder.getItem());
132 viewHolder.itemView.addOnLayoutChangeListener(sLayoutChangeListener);
/frameworks/support/samples/SupportLeanbackDemos/src/com/example/android/leanback/
DCardPresenter.java104 public void onBindViewHolder(ViewHolder viewHolder, Object item) { in onBindViewHolder() argument
107 Drawable drawable = viewHolder.view.getContext().getResources() in onBindViewHolder()
109 ((ImageCardView) viewHolder.view).setMainImage(drawable); in onBindViewHolder()
110 ((ImageCardView) viewHolder.view).setTitleText(photoItem.getTitle()); in onBindViewHolder()
112 ((ImageCardView) viewHolder.view).setContentText(photoItem.getContent()); in onBindViewHolder()
117 public void onUnbindViewHolder(ViewHolder viewHolder) { in onUnbindViewHolder() argument
/frameworks/support/samples/SupportLeanbackShowcase/app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/cards/presenters/
DAbstractCardPresenter.java50 @Override public final void onBindViewHolder(ViewHolder viewHolder, Object item) { in onBindViewHolder() argument
52 onBindViewHolder(card, (T) viewHolder.view); in onBindViewHolder()
55 @Override public final void onUnbindViewHolder(ViewHolder viewHolder) { in onUnbindViewHolder() argument
56 onUnbindViewHolder((T) viewHolder.view); in onUnbindViewHolder()

123