Home
last modified time | relevance | path

Searched refs:vh (Results 1 – 25 of 31) sorted by relevance

12

/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
DPlaybackControlsRowPresenter.java164 ViewHolder vh = ((BoundData) data).mRowViewHolder;
165 if (vh.mSelectedViewHolder != itemViewHolder || vh.mSelectedItem != item) {
166 vh.mSelectedViewHolder = itemViewHolder;
167 vh.mSelectedItem = item;
168 vh.dispatchItemSelection();
178 ViewHolder vh = ((BoundData) data).mRowViewHolder;
180 getOnItemClickedListener().onItemClicked(item, vh.getRow());
184 vh, vh.getRow());
286 public void showBottomSpace(ViewHolder vh, boolean show) { in showBottomSpace() argument
287 vh.mBottomSpacer.setVisibility(show ? View.VISIBLE : View.GONE); in showBottomSpace()
[all …]
DRowPresenter.java165 ViewHolder vh = createRowViewHolder(parent); in onCreateViewHolder() local
166 vh.mInitialzed = false; in onCreateViewHolder()
171 vh.mHeaderViewHolder = (RowHeaderPresenter.ViewHolder) in onCreateViewHolder()
172 mHeaderPresenter.onCreateViewHolder((ViewGroup) vh.view); in onCreateViewHolder()
174 result = new ContainerViewHolder(containerView, vh); in onCreateViewHolder()
176 result = vh; in onCreateViewHolder()
178 initializeRowViewHolder(vh); in onCreateViewHolder()
179 if (!vh.mInitialzed) { in onCreateViewHolder()
201 protected void initializeRowViewHolder(ViewHolder vh) { in initializeRowViewHolder() argument
202 vh.mInitialzed = true; in initializeRowViewHolder()
[all …]
DAbstractDetailsDescriptionPresenter.java118 ViewHolder vh = (ViewHolder) viewHolder; in onBindViewHolder() local
119 onBindDescription(vh, item); in onBindViewHolder()
122 if (TextUtils.isEmpty(vh.mTitle.getText())) { in onBindViewHolder()
123 vh.mTitle.setVisibility(View.GONE); in onBindViewHolder()
126 vh.mTitle.setVisibility(View.VISIBLE); in onBindViewHolder()
127 vh.mTitle.setLineSpacing(vh.mTitleLineSpacing - vh.mTitle.getLineHeight() + in onBindViewHolder()
128 vh.mTitle.getLineSpacingExtra(), vh.mTitle.getLineSpacingMultiplier()); in onBindViewHolder()
130 setTopMargin(vh.mTitle, vh.mTitleMargin); in onBindViewHolder()
133 if (TextUtils.isEmpty(vh.mSubtitle.getText())) { in onBindViewHolder()
134 vh.mSubtitle.setVisibility(View.GONE); in onBindViewHolder()
[all …]
DPlaybackControlsPresenter.java228 public void setProgressColor(ViewHolder vh, int color) { in setProgressColor() argument
231 ((LayerDrawable) vh.mProgressBar.getProgressDrawable()) in setProgressColor()
235 public void setTotalTime(ViewHolder vh, int ms) { in setTotalTime() argument
236 vh.setTotalTime(ms); in setTotalTime()
239 public int getTotalTime(ViewHolder vh) { in getTotalTime() argument
240 return vh.getTotalTime(); in getTotalTime()
243 public void setCurrentTime(ViewHolder vh, int ms) { in setCurrentTime() argument
244 vh.setCurrentTime(ms); in setCurrentTime()
247 public int getCurrentTime(ViewHolder vh) { in getCurrentTime() argument
248 return vh.getCurrentTime(); in getCurrentTime()
[all …]
DListRowPresenter.java332 private int getSpaceUnderBaseline(ListRowPresenter.ViewHolder vh) { in getSpaceUnderBaseline() argument
333 RowHeaderPresenter.ViewHolder headerViewHolder = vh.getHeaderViewHolder(); in getSpaceUnderBaseline()
343 private void setVerticalPadding(ListRowPresenter.ViewHolder vh) { in setVerticalPadding() argument
346 if (vh.isExpanded()) { in setVerticalPadding()
347 int headerSpaceUnderBaseline = getSpaceUnderBaseline(vh); in setVerticalPadding()
349 paddingTop = (vh.isSelected() ? sExpandedSelectedRowTopPadding : vh.mPaddingTop) - in setVerticalPadding()
352 sExpandedRowNoHovercardBottomPadding : vh.mPaddingBottom; in setVerticalPadding()
353 } else if (vh.isSelected()) { in setVerticalPadding()
354 paddingTop = sSelectedRowTopPadding - vh.mPaddingBottom; in setVerticalPadding()
358 paddingBottom = vh.mPaddingBottom; in setVerticalPadding()
[all …]
DActionPresenterSelector.java62 ActionViewHolder vh = (ActionViewHolder) viewHolder; in onBindViewHolder() local
63 vh.mAction = action; in onBindViewHolder()
64 vh.mButton.setText(action.getLabel1()); in onBindViewHolder()
84 ActionViewHolder vh = (ActionViewHolder) viewHolder; in onBindViewHolder() local
86 vh.mAction = action; in onBindViewHolder()
89 final int startPadding = vh.view.getResources() in onBindViewHolder()
91 final int endPadding = vh.view.getResources() in onBindViewHolder()
93 vh.view.setPaddingRelative(startPadding, 0, endPadding, 0); in onBindViewHolder()
95 final int padding = vh.view.getResources() in onBindViewHolder()
97 vh.view.setPaddingRelative(padding, 0, padding, 0); in onBindViewHolder()
[all …]
DVerticalGridPresenter.java139 ViewHolder vh = createGridViewHolder(parent); in onCreateViewHolder() local
140 vh.mInitialized = false; in onCreateViewHolder()
141 initializeGridViewHolder(vh); in onCreateViewHolder()
142 if (!vh.mInitialized) { in onCreateViewHolder()
145 return vh; in onCreateViewHolder()
179 protected void initializeGridViewHolder(ViewHolder vh) { in initializeGridViewHolder() argument
184 vh.getGridView().setNumColumns(mNumColumns); in initializeGridViewHolder()
185 vh.mInitialized = true; in initializeGridViewHolder()
187 vh.mItemBridgeAdapter.setWrapper(mWrapper); in initializeGridViewHolder()
189 ShadowOverlayContainer.prepareParentForShadow(vh.getGridView()); in initializeGridViewHolder()
[all …]
DControlBarPresenter.java149 Presenter.ViewHolder vh = mViewHolders.get(position); in bindControlToAction() local
151 if (vh == null) { in bindControlToAction()
152 vh = presenter.onCreateViewHolder(mControlBar); in bindControlToAction()
153 mViewHolders.put(position, vh); in bindControlToAction()
155 final Presenter.ViewHolder itemViewHolder = vh; in bindControlToAction()
156 presenter.setOnClickListener(vh, new View.OnClickListener() { in bindControlToAction()
167 if (vh.view.getParent() == null) { in bindControlToAction()
168 mControlBar.addView(vh.view); in bindControlToAction()
170 presenter.onBindViewHolder(vh, item); in bindControlToAction()
241 ViewHolder vh = (ViewHolder) holder; in onBindViewHolder() local
[all …]
DDetailsOverviewRowPresenter.java372 protected void onRowViewSelected(RowPresenter.ViewHolder vh, boolean selected) { in onRowViewSelected() argument
373 super.onRowViewSelected(vh, selected); in onRowViewSelected()
375 ((ViewHolder) vh).dispatchItemSelection(null); in onRowViewSelected()
383 ViewHolder vh = new ViewHolder(v, mDetailsPresenter); in createRowViewHolder() local
385 initDetailsOverview(vh); in createRowViewHolder()
387 return vh; in createRowViewHolder()
396 private void initDetailsOverview(ViewHolder vh) { in initDetailsOverview() argument
397 final View overview = vh.mOverviewFrame; in initDetailsOverview()
403 vh.mOverviewFrame.setForeground(null); in initDetailsOverview()
422 ViewHolder vh = (ViewHolder) holder; in onBindRowViewHolder() local
[all …]
DControlButtonPresenterSelector.java89 ActionViewHolder vh = (ActionViewHolder) viewHolder; in onBindViewHolder() local
90 vh.mIcon.setImageDrawable(action.getIcon()); in onBindViewHolder()
91 if (vh.mLabel != null) { in onBindViewHolder()
93 vh.mLabel.setText(action.getLabel1()); in onBindViewHolder()
95 vh.mLabel.setText(null); in onBindViewHolder()
100 if (!TextUtils.equals(vh.mFocusableView.getContentDescription(), contentDescription)) { in onBindViewHolder()
101 vh.mFocusableView.setContentDescription(contentDescription); in onBindViewHolder()
102 vh.mFocusableView.sendAccessibilityEvent( in onBindViewHolder()
109 ActionViewHolder vh = (ActionViewHolder) viewHolder; in onUnbindViewHolder() local
110 vh.mIcon.setImageDrawable(null); in onUnbindViewHolder()
[all …]
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/
DDefaultItemAnimatorTest.java167 ViewHolder vh = createViewHolder(1); in testAnimateAdd() local
168 expectItems(vh); in testAnimateAdd()
169 assertTrue(animateAdd(vh)); in testAnimateAdd()
175 ViewHolder vh = createViewHolder(1); in testAnimateRemove() local
176 expectItems(vh); in testAnimateRemove()
177 assertTrue(animateRemove(vh)); in testAnimateRemove()
183 ViewHolder vh = createViewHolder(1); in testAnimateMove() local
184 expectItems(vh); in testAnimateMove()
185 assertTrue(animateMove(vh, 0, 0, 100, 100)); in testAnimateMove()
191 ViewHolder vh = createViewHolder(1); in testAnimateChange() local
[all …]
DRecyclerViewAnimationsTest.java212 for (RecyclerView.ViewHolder vh : addVH) { in testAddRemoveSamePass()
213 assertNotSame("add-remove item should not animate add", testView[0], vh.itemView); in testAddRemoveSamePass()
215 for (RecyclerView.ViewHolder vh : moveVH) { in testAddRemoveSamePass()
216 assertNotSame("add-remove item should not animate move", testView[0], vh.itemView); in testAddRemoveSamePass()
218 for (RecyclerView.ViewHolder vh : removeVH) { in testAddRemoveSamePass()
219 assertNotSame("add-remove item should not animate remove", testView[0], vh.itemView); in testAddRemoveSamePass()
222 for (RecyclerView.ViewHolder vh : mRecycledViews) { in testAddRemoveSamePass()
223 found |= vh.itemView == testView[0]; in testAddRemoveSamePass()
259 TestViewHolder vh = super.onCreateViewHolder(parent, viewType); in changeAnimTest()
261 Log.d(TAG, logPrefix + " onCreateVH" + vh.toString()); in changeAnimTest()
[all …]
DBaseRecyclerViewInstrumentationTest.java227 RecyclerView.ViewHolder vh = parent.getChildViewHolder(view); in setRecyclerView()
228 if (!vh.isRemoved()) { in setRecyclerView()
231 vh.getAdapterPosition(), RecyclerView.NO_POSITION); in setRecyclerView()
370 RecyclerView.ViewHolder vh = mRecyclerView.getChildViewHolder(view); in assertVisibleItemPositions() local
371 assertSame("item position in LP should match adapter value :" + vh, in assertVisibleItemPositions()
372 testAdapter.mItems.get(vh.mPosition), item); in assertVisibleItemPositions()
761 RecyclerView.ViewHolder vh = recyclerView.getChildViewHolder(view); in validateRemaining() local
762 assertTrue("remaining view should be in attached set " + vh, in validateRemaining()
763 mAttachedSet.contains(vh)); in validateRemaining()
DRecyclerViewLayoutTest.java493 TestViewHolder vh = (TestViewHolder) recyclerView.getChildViewHolder(view); in adapterPositionsTest()
494 int index = testAdapter.mItems.indexOf(vh.mBoundItem); in adapterPositionsTest()
495 assertEquals("should be able to find VH with adapter position " + index, vh, in adapterPositionsTest()
498 vh.getAdapterPosition()); in adapterPositionsTest()
499 layoutPositions.put(view, vh.mPosition); in adapterPositionsTest()
505 TestViewHolder vh = (TestViewHolder) recyclerView in adapterPositionsTest()
507 int index = testAdapter.mItems.indexOf(vh.mBoundItem); in adapterPositionsTest()
510 + index, vh, in adapterPositionsTest()
514 vh.getAdapterPosition()); in adapterPositionsTest()
516 vh, mRecyclerView.findViewHolderForLayoutPosition( in adapterPositionsTest()
[all …]
DAdapterHelperTest.java81 for (ViewHolder vh : mViewHolders) { in cleanState()
82 if (vh.mPosition == position && !vh.isRemoved()) { in cleanState()
83 return vh; in cleanState()
840 for (RecyclerViewBasicTest.MockViewHolder vh : mViewHolders) { in preProcess()
841 final int ind = mTestAdapter.mItems.indexOf(vh.mItem); in preProcess()
843 mAdapterHelper.applyPendingUpdatesToPosition(vh.mPosition)); in preProcess()
858 for (ViewHolder vh : mViewHolders) { in preProcess()
859 vhLogBuilder.append("\n").append(vh.toString()); in preProcess()
DGridLayoutManagerTest.java425 for (RecyclerView.ViewHolder vh : viewHolderMap.values()) { in testUnevenHeights()
427 vh.itemView.getHeight()); in testUnevenHeights()
430 for (RecyclerView.ViewHolder vh : viewHolderMap.values()) { in testUnevenHeights()
432 vh.itemView.getMeasuredHeight()); in testUnevenHeights()
451 for (RecyclerView.ViewHolder vh : viewHolderMap.values()) { in testUnevenWidths()
453 vh.itemView.getWidth()); in testUnevenWidths()
456 for (RecyclerView.ViewHolder vh : viewHolderMap.values()) { in testUnevenWidths()
458 vh.itemView.getMeasuredWidth()); in testUnevenWidths()
DLinearLayoutManagerTest.java112 final RecyclerView.ViewHolder vh = mRecyclerView.findViewHolderForLayoutPosition(center); in testKeepFocusOnRelayout() local
113 final int top = mLayoutManager.mOrientationHelper.getDecoratedStart(vh.itemView); in testKeepFocusOnRelayout()
117 vh.itemView.requestFocus(); in testKeepFocusOnRelayout()
120 assertTrue("view should have the focus", vh.itemView.hasFocus()); in testKeepFocusOnRelayout()
130 assertSame("same view holder should be kept for unchanged child", vh, postVH); in testKeepFocusOnRelayout()
331 RecyclerView.ViewHolder vh = in scrollToPositionWithPredictive()
333 assertNotNull("scroll to position should work", vh); in scrollToPositionWithPredictive()
337 ((RecyclerView.LayoutParams) vh.itemView in scrollToPositionWithPredictive()
339 mLayoutManager.getDecoratedTop(vh.itemView)); in scrollToPositionWithPredictive()
1061 TestViewHolder vh = (TestViewHolder) lp.mViewHolder; in collectChildCoordinates()
[all …]
DStaggeredGridLayoutManagerTest.java132 void onBoundItem(TestViewHolder vh, int position) { in testFindLastInUnevenDistribution()
133 LayoutParams lp = (LayoutParams) vh.itemView.getLayoutParams(); in testFindLastInUnevenDistribution()
180 void onBoundItem(TestViewHolder vh, int position) { in customSizeInScrollDirectionTest()
181 final ViewGroup.LayoutParams layoutParams = vh.itemView.getLayoutParams(); in customSizeInScrollDirectionTest()
188 sizeMap.put(vh.itemView, size); in customSizeInScrollDirectionTest()
190 getLp(vh.itemView).setFullSpan(true); in customSizeInScrollDirectionTest()
286 public void onBoundItem(TestViewHolder vh, int position) { in scrollBackAndPreservePositionsTest()
287 LayoutParams lp = (LayoutParams) vh.itemView.getLayoutParams(); in scrollBackAndPreservePositionsTest()
401 RecyclerView.ViewHolder vh = rv.findViewHolderForLayoutPosition(scrollPosition); in scrollToPositionWithPredictive()
402 assertNotNull("scroll to position should work", vh); in scrollToPositionWithPredictive()
[all …]
/frameworks/support/v17/leanback/src/android/support/v17/leanback/app/
DRowsFragment.java205 …ItemBridgeAdapter.ViewHolder vh = (ItemBridgeAdapter.ViewHolder) listView.getChildViewHolder(view); in setExpand() local
206 setRowViewExpanded(vh, mExpand); in setExpand()
222 ItemBridgeAdapter.ViewHolder vh = (ItemBridgeAdapter.ViewHolder) in setOnItemSelectedListener() local
224 setOnItemSelectedListener(vh, mOnItemSelectedListener); in setOnItemSelectedListener()
239 ItemBridgeAdapter.ViewHolder vh = (ItemBridgeAdapter.ViewHolder) in setOnItemViewSelectedListener() local
241 setOnItemViewSelectedListener(vh, mOnItemViewSelectedListener); in setOnItemViewSelectedListener()
268 ItemBridgeAdapter.ViewHolder vh = (view == null) ? null : in onRowSelected() local
271 if (mSelectedViewHolder != vh) { in onRowSelected()
277 mSelectedViewHolder = vh; in onRowSelected()
354 private static void setRowViewExpanded(ItemBridgeAdapter.ViewHolder vh, boolean expanded) { in setRowViewExpanded() argument
[all …]
DRowsSupportFragment.java207 …ItemBridgeAdapter.ViewHolder vh = (ItemBridgeAdapter.ViewHolder) listView.getChildViewHolder(view); in setExpand() local
208 setRowViewExpanded(vh, mExpand); in setExpand()
224 ItemBridgeAdapter.ViewHolder vh = (ItemBridgeAdapter.ViewHolder) in setOnItemSelectedListener() local
226 setOnItemSelectedListener(vh, mOnItemSelectedListener); in setOnItemSelectedListener()
241 ItemBridgeAdapter.ViewHolder vh = (ItemBridgeAdapter.ViewHolder) in setOnItemViewSelectedListener() local
243 setOnItemViewSelectedListener(vh, mOnItemViewSelectedListener); in setOnItemViewSelectedListener()
270 ItemBridgeAdapter.ViewHolder vh = (view == null) ? null : in onRowSelected() local
273 if (mSelectedViewHolder != vh) { in onRowSelected()
279 mSelectedViewHolder = vh; in onRowSelected()
356 private static void setRowViewExpanded(ItemBridgeAdapter.ViewHolder vh, boolean expanded) { in setRowViewExpanded() argument
[all …]
DPlaybackOverlayFragment.java191 private void resetControlsToPrimaryActions(ItemBridgeAdapter.ViewHolder vh) { in resetControlsToPrimaryActions() argument
192 if (vh == null && getVerticalGridView() != null) { in resetControlsToPrimaryActions()
193 vh = (ItemBridgeAdapter.ViewHolder) getVerticalGridView().findViewHolderForPosition(0); in resetControlsToPrimaryActions()
195 if (vh == null) { in resetControlsToPrimaryActions()
197 } else if (vh.getPresenter() instanceof PlaybackControlsRowPresenter) { in resetControlsToPrimaryActions()
199 ((PlaybackControlsRowPresenter) vh.getPresenter()).showPrimaryActions( in resetControlsToPrimaryActions()
200 (PlaybackControlsRowPresenter.ViewHolder) vh.getViewHolder()); in resetControlsToPrimaryActions()
369 RecyclerView.ViewHolder vh = getVerticalGridView().findViewHolderForPosition(0); in getControlRowView() local
370 if (vh == null) { in getControlRowView()
373 return vh.itemView; in getControlRowView()
[all …]
DPlaybackOverlaySupportFragment.java193 private void resetControlsToPrimaryActions(ItemBridgeAdapter.ViewHolder vh) { in resetControlsToPrimaryActions() argument
194 if (vh == null && getVerticalGridView() != null) { in resetControlsToPrimaryActions()
195 vh = (ItemBridgeAdapter.ViewHolder) getVerticalGridView().findViewHolderForPosition(0); in resetControlsToPrimaryActions()
197 if (vh == null) { in resetControlsToPrimaryActions()
199 } else if (vh.getPresenter() instanceof PlaybackControlsRowPresenter) { in resetControlsToPrimaryActions()
201 ((PlaybackControlsRowPresenter) vh.getPresenter()).showPrimaryActions( in resetControlsToPrimaryActions()
202 (PlaybackControlsRowPresenter.ViewHolder) vh.getViewHolder()); in resetControlsToPrimaryActions()
371 RecyclerView.ViewHolder vh = getVerticalGridView().findViewHolderForPosition(0); in getControlRowView() local
372 if (vh == null) { in getControlRowView()
375 return vh.itemView; in getControlRowView()
[all …]
/frameworks/opt/timezonepicker/src/com/android/timezonepicker/
DTimeZoneResultAdapter.java70 ViewHolder vh = new ViewHolder(); in setupViewHolder() local
71 vh.timeZone = (TextView) v.findViewById(R.id.time_zone); in setupViewHolder()
72 vh.timeOffset = (TextView) v.findViewById(R.id.time_offset); in setupViewHolder()
73 vh.location = (TextView) v.findViewById(R.id.location); in setupViewHolder()
74 v.setTag(vh); in setupViewHolder()
281 ViewHolder vh = (ViewHolder) v.getTag(); in getView() local
286 vh.timeZone.setText(tzi.mDisplayName); in getView()
288 vh.timeOffset.setText(tzi.getGmtDisplayName(mContext)); in getView()
292 vh.location.setVisibility(View.INVISIBLE); in getView()
294 vh.location.setText(location); in getView()
[all …]
DTimeZoneFilterTypeAdapter.java56 ViewHolder vh = new ViewHolder(); in setupViewHolder() local
57 vh.strTextView = (TextView) v.findViewById(R.id.value); in setupViewHolder()
58 v.setTag(vh); in setupViewHolder()
121 ViewHolder vh = (ViewHolder) v.getTag(); in getView() local
129 vh.filterType = filter.type; in getView()
130 vh.str = filter.constraint; in getView()
131 vh.time = filter.time; in getView()
132 vh.strTextView.setText(filter.constraint); in getView()
151 ViewHolder vh = (ViewHolder) v.getTag(); in onClick() local
152 mListener.onSetFilter(vh.filterType, vh.str, vh.time); in onClick()
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/
DRecyclerView.java419 final ViewHolder vh = getChildViewHolderInt(child); in initChildrenHelper()
420 if (vh != null) { in initChildrenHelper()
421 if (!vh.isTmpDetached() && !vh.shouldIgnore()) { in initChildrenHelper()
423 + " detached: " + vh); in initChildrenHelper()
426 Log.d(TAG, "reAttach " + vh); in initChildrenHelper()
428 vh.clearTmpDetachFlag(); in initChildrenHelper()
437 final ViewHolder vh = getChildViewHolderInt(view); in initChildrenHelper()
438 if (vh != null) { in initChildrenHelper()
439 if (vh.isTmpDetached() && !vh.shouldIgnore()) { in initChildrenHelper()
441 + " detached child " + vh); in initChildrenHelper()
[all …]

12