/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/ |
D | RowPresenter.java | 325 ViewHolder vh = createRowViewHolder(parent); in onCreateViewHolder() local 326 vh.mInitialzed = false; in onCreateViewHolder() 331 vh.mHeaderViewHolder = (RowHeaderPresenter.ViewHolder) in onCreateViewHolder() 332 mHeaderPresenter.onCreateViewHolder((ViewGroup) vh.view); in onCreateViewHolder() 334 result = new ContainerViewHolder(containerView, vh); in onCreateViewHolder() 336 result = vh; in onCreateViewHolder() 338 initializeRowViewHolder(vh); in onCreateViewHolder() 339 if (!vh.mInitialzed) { in onCreateViewHolder() 371 protected void initializeRowViewHolder(ViewHolder vh) { in initializeRowViewHolder() argument 372 vh.mInitialzed = true; in initializeRowViewHolder() [all …]
|
D | PlaybackControlsRowPresenter.java | 172 ViewHolder vh = ((BoundData) data).mRowViewHolder; 173 if (vh.mSelectedViewHolder != itemViewHolder || vh.mSelectedItem != item) { 174 vh.mSelectedViewHolder = itemViewHolder; 175 vh.mSelectedItem = item; 176 vh.dispatchItemSelection(); 186 ViewHolder vh = ((BoundData) data).mRowViewHolder; 187 if (vh.getOnItemViewClickedListener() != null) { 188 vh.getOnItemViewClickedListener().onItemClicked(itemViewHolder, item, 189 vh, vh.getRow()); 293 public void showBottomSpace(ViewHolder vh, boolean show) { in showBottomSpace() argument [all …]
|
D | AbstractDetailsDescriptionPresenter.java | 160 ViewHolder vh = (ViewHolder) viewHolder; in onBindViewHolder() local 161 onBindDescription(vh, item); in onBindViewHolder() 164 if (TextUtils.isEmpty(vh.mTitle.getText())) { in onBindViewHolder() 165 vh.mTitle.setVisibility(View.GONE); in onBindViewHolder() 168 vh.mTitle.setVisibility(View.VISIBLE); in onBindViewHolder() 169 vh.mTitle.setLineSpacing(vh.mTitleLineSpacing - vh.mTitle.getLineHeight() in onBindViewHolder() 170 + vh.mTitle.getLineSpacingExtra(), vh.mTitle.getLineSpacingMultiplier()); in onBindViewHolder() 171 vh.mTitle.setMaxLines(vh.mTitleMaxLines); in onBindViewHolder() 173 setTopMargin(vh.mTitle, vh.mTitleMargin); in onBindViewHolder() 176 if (TextUtils.isEmpty(vh.mSubtitle.getText())) { in onBindViewHolder() [all …]
|
D | GuidedActionsStylist.java | 677 public void onBindViewHolder(ViewHolder vh, GuidedAction action) { in onBindViewHolder() argument 678 vh.mAction = action; in onBindViewHolder() 679 if (vh.mTitleView != null) { in onBindViewHolder() 680 vh.mTitleView.setInputType(action.getInputType()); in onBindViewHolder() 681 vh.mTitleView.setText(action.getTitle()); in onBindViewHolder() 682 vh.mTitleView.setAlpha(action.isEnabled() ? mEnabledTextAlpha : mDisabledTextAlpha); in onBindViewHolder() 683 vh.mTitleView.setFocusable(false); in onBindViewHolder() 684 vh.mTitleView.setClickable(false); in onBindViewHolder() 685 vh.mTitleView.setLongClickable(false); in onBindViewHolder() 687 if (vh.mDescriptionView != null) { in onBindViewHolder() [all …]
|
D | PlaybackControlsPresenter.java | 237 public void setProgressColor(ViewHolder vh, @ColorInt int color) { in setProgressColor() argument 240 ((LayerDrawable) vh.mProgressBar.getProgressDrawable()) in setProgressColor() 244 public void setTotalTime(ViewHolder vh, int ms) { in setTotalTime() argument 245 setTotalTimeLong(vh, (long) ms); in setTotalTime() 248 public void setTotalTimeLong(ViewHolder vh, long ms) { in setTotalTimeLong() argument 249 vh.setTotalTime(ms); in setTotalTimeLong() 252 public int getTotalTime(ViewHolder vh) { in getTotalTime() argument 253 return MathUtil.safeLongToInt(getTotalTimeLong(vh)); in getTotalTime() 256 public long getTotalTimeLong(ViewHolder vh) { in getTotalTimeLong() argument 257 return vh.getTotalTime(); in getTotalTimeLong() [all …]
|
D | PlaybackTransportRowPresenter.java | 554 ViewHolder vh = ((BoundData) data).mRowViewHolder; 555 if (vh.mSelectedViewHolder != itemViewHolder || vh.mSelectedItem != item) { 556 vh.mSelectedViewHolder = itemViewHolder; 557 vh.mSelectedItem = item; 558 vh.dispatchItemSelection(); 568 ViewHolder vh = ((BoundData) data).mRowViewHolder; 569 if (vh.getOnItemViewClickedListener() != null) { 570 vh.getOnItemViewClickedListener().onItemClicked(itemViewHolder, item, 571 vh, vh.getRow()); 635 ViewHolder vh = (ViewHolder) rowViewHolder; in onReappear() local [all …]
|
D | DetailsOverviewRowPresenter.java | 404 protected void onRowViewSelected(RowPresenter.ViewHolder vh, boolean selected) { in onRowViewSelected() argument 405 super.onRowViewSelected(vh, selected); in onRowViewSelected() 407 ((ViewHolder) vh).dispatchItemSelection(null); in onRowViewSelected() 415 ViewHolder vh = new ViewHolder(v, mDetailsPresenter); in createRowViewHolder() local 417 initDetailsOverview(vh); in createRowViewHolder() 419 return vh; in createRowViewHolder() 428 private void initDetailsOverview(final ViewHolder vh) { in initDetailsOverview() argument 429 vh.mActionBridgeAdapter = new ActionsItemBridgeAdapter(vh); in initDetailsOverview() 430 final View overview = vh.mOverviewFrame; in initDetailsOverview() 436 vh.mOverviewFrame.setForeground(null); in initDetailsOverview() [all …]
|
D | ControlBarPresenter.java | 151 Presenter.ViewHolder vh = mViewHolders.get(position); in bindControlToAction() local 153 if (vh == null) { in bindControlToAction() 154 vh = presenter.onCreateViewHolder(mControlBar); in bindControlToAction() 155 mViewHolders.put(position, vh); in bindControlToAction() 157 final Presenter.ViewHolder itemViewHolder = vh; in bindControlToAction() 158 presenter.setOnClickListener(vh, new View.OnClickListener() { in bindControlToAction() 169 if (vh.view.getParent() == null) { in bindControlToAction() 170 mControlBar.addView(vh.view); in bindControlToAction() 172 presenter.onBindViewHolder(vh, item); in bindControlToAction() 235 public void setBackgroundColor(ViewHolder vh, int color) { in setBackgroundColor() argument [all …]
|
D | ActionPresenterSelector.java | 69 ActionViewHolder vh = (ActionViewHolder) viewHolder; in onBindViewHolder() local 70 vh.mAction = action; in onBindViewHolder() 71 vh.mButton.setText(action.getLabel1()); in onBindViewHolder() 91 ActionViewHolder vh = (ActionViewHolder) viewHolder; in onBindViewHolder() local 93 vh.mAction = action; in onBindViewHolder() 96 final int startPadding = vh.view.getResources() in onBindViewHolder() 98 final int endPadding = vh.view.getResources() in onBindViewHolder() 100 vh.view.setPaddingRelative(startPadding, 0, endPadding, 0); in onBindViewHolder() 102 final int padding = vh.view.getResources() in onBindViewHolder() 104 vh.view.setPaddingRelative(padding, 0, padding, 0); in onBindViewHolder() [all …]
|
D | ListRowPresenter.java | 534 private int getSpaceUnderBaseline(ListRowPresenter.ViewHolder vh) { in getSpaceUnderBaseline() argument 535 RowHeaderPresenter.ViewHolder headerViewHolder = vh.getHeaderViewHolder(); in getSpaceUnderBaseline() 545 private void setVerticalPadding(ListRowPresenter.ViewHolder vh) { in setVerticalPadding() argument 548 if (vh.isExpanded()) { in setVerticalPadding() 549 int headerSpaceUnderBaseline = getSpaceUnderBaseline(vh); in setVerticalPadding() 551 paddingTop = (vh.isSelected() ? sExpandedSelectedRowTopPadding : vh.mPaddingTop) in setVerticalPadding() 554 ? sExpandedRowNoHovercardBottomPadding : vh.mPaddingBottom; in setVerticalPadding() 555 } else if (vh.isSelected()) { in setVerticalPadding() 556 paddingTop = sSelectedRowTopPadding - vh.mPaddingBottom; in setVerticalPadding() 560 paddingBottom = vh.mPaddingBottom; in setVerticalPadding() [all …]
|
D | VerticalGridPresenter.java | 234 ViewHolder vh = createGridViewHolder(parent); in onCreateViewHolder() local 235 vh.mInitialized = false; in onCreateViewHolder() 236 vh.mItemBridgeAdapter = new VerticalGridItemBridgeAdapter(); in onCreateViewHolder() 237 initializeGridViewHolder(vh); in onCreateViewHolder() 238 if (!vh.mInitialized) { in onCreateViewHolder() 241 return vh; in onCreateViewHolder() 260 protected void initializeGridViewHolder(ViewHolder vh) { in initializeGridViewHolder() argument 265 vh.getGridView().setNumColumns(mNumColumns); in initializeGridViewHolder() 266 vh.mInitialized = true; in initializeGridViewHolder() 268 Context context = vh.mGridView.getContext(); in initializeGridViewHolder() [all …]
|
D | ControlButtonPresenterSelector.java | 95 ActionViewHolder vh = (ActionViewHolder) viewHolder; in onBindViewHolder() local 96 vh.mIcon.setImageDrawable(action.getIcon()); in onBindViewHolder() 97 if (vh.mLabel != null) { in onBindViewHolder() 99 vh.mLabel.setText(action.getLabel1()); in onBindViewHolder() 101 vh.mLabel.setText(null); in onBindViewHolder() 106 if (!TextUtils.equals(vh.mFocusableView.getContentDescription(), contentDescription)) { in onBindViewHolder() 107 vh.mFocusableView.setContentDescription(contentDescription); in onBindViewHolder() 108 vh.mFocusableView.sendAccessibilityEvent( in onBindViewHolder() 115 ActionViewHolder vh = (ActionViewHolder) viewHolder; in onUnbindViewHolder() local 116 vh.mIcon.setImageDrawable(null); in onUnbindViewHolder() [all …]
|
D | RowHeaderPresenter.java | 141 RowHeaderPresenter.ViewHolder vh = (RowHeaderPresenter.ViewHolder)viewHolder; in onBindViewHolder() local 143 if (vh.mTitleView != null) { in onBindViewHolder() 144 vh.mTitleView.setText(null); in onBindViewHolder() 146 if (vh.mDescriptionView != null) { in onBindViewHolder() 147 vh.mDescriptionView.setText(null); in onBindViewHolder() 155 if (vh.mTitleView != null) { in onBindViewHolder() 156 vh.mTitleView.setText(headerItem.getName()); in onBindViewHolder() 158 if (vh.mDescriptionView != null) { in onBindViewHolder() 160 vh.mDescriptionView.setVisibility(View.GONE); in onBindViewHolder() 162 vh.mDescriptionView.setVisibility(View.VISIBLE); in onBindViewHolder() [all …]
|
D | AbstractMediaItemPresenter.java | 432 final ViewHolder vh = new ViewHolder(view); in createRowViewHolder() local 433 vh.mRowPresenter = this; in createRowViewHolder() 435 vh.mMediaRowView.setBackgroundColor(mBackgroundColor); in createRowViewHolder() 437 return vh; in createRowViewHolder() 451 protected void onBindRowViewHolder(RowPresenter.ViewHolder vh, Object item) { in onBindRowViewHolder() argument 452 super.onBindRowViewHolder(vh, item); in onBindRowViewHolder() 454 final ViewHolder mvh = (ViewHolder) vh; in onBindRowViewHolder() 462 onBindMediaDetails((ViewHolder) vh, item); in onBindRowViewHolder() 469 protected void onBindRowActions(ViewHolder vh) { in onBindRowActions() argument 470 vh.onBindRowActions(); in onBindRowActions() [all …]
|
D | FullWidthDetailsOverviewRowPresenter.java | 106 public void onBindLogo(ViewHolder vh) { in onBindLogo() argument 535 final ViewHolder vh = new ViewHolder(v, mDetailsPresenter, mDetailsOverviewLogoPresenter); in createRowViewHolder() local 536 mDetailsOverviewLogoPresenter.setContext(vh.mDetailsLogoViewHolder, vh, this); in createRowViewHolder() 537 setState(vh, mInitialState); in createRowViewHolder() 539 vh.mActionBridgeAdapter = new ActionsItemBridgeAdapter(vh); in createRowViewHolder() 540 final View overview = vh.mOverviewFrame; in createRowViewHolder() 551 vh.mOverviewFrame.setForeground(null); in createRowViewHolder() 554 vh.mActionsRow.setOnUnhandledKeyListener(new BaseGridView.OnUnhandledKeyListener() { in createRowViewHolder() 557 if (vh.getOnKeyListener() != null) { in createRowViewHolder() 558 if (vh.getOnKeyListener().onKey(vh.view, event.getKeyCode(), event)) { in createRowViewHolder() [all …]
|
D | AbstractMediaListHeaderPresenter.java | 98 ViewHolder vh = new ViewHolder(view); in createRowViewHolder() local 100 vh.view.setBackgroundColor(mBackgroundColor); in createRowViewHolder() 102 return vh; in createRowViewHolder() 106 protected void onBindRowViewHolder(RowPresenter.ViewHolder vh, Object item) { in onBindRowViewHolder() argument 107 super.onBindRowViewHolder(vh, item); in onBindRowViewHolder() 108 onBindMediaListHeaderViewHolder((ViewHolder) vh, item); in onBindRowViewHolder() 132 protected abstract void onBindMediaListHeaderViewHolder(ViewHolder vh, Object item); in onBindMediaListHeaderViewHolder() argument
|
/frameworks/support/v7/recyclerview/jvm-tests/src/android/support/v7/widget/ |
D | ViewInfoStoreTest.java | 58 RecyclerView.ViewHolder vh = new MockViewHolder(); in addOverridePre() local 60 mStore.addToPreLayout(vh, info); in addOverridePre() 62 mStore.addToPreLayout(vh, info2); in addOverridePre() 63 assertSame(info2, find(vh, FLAG_PRE)); in addOverridePre() 68 RecyclerView.ViewHolder vh = new MockViewHolder(); in addOverridePost() local 70 mStore.addToPostLayout(vh, info); in addOverridePost() 72 mStore.addToPostLayout(vh, info2); in addOverridePost() 73 assertSame(info2, find(vh, FLAG_POST)); in addOverridePost() 78 RecyclerView.ViewHolder vh = new MockViewHolder(); in addRemoveAndReAdd() local 80 mStore.addToPreLayout(vh, pre); in addRemoveAndReAdd() [all …]
|
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ |
D | DefaultItemAnimatorTest.java | 123 RecyclerView.ViewHolder vh = new ViewHolder(new TextView(getActivity())); in reUseWithPayload() local 124 assertFalse(mAnimator.canReuseUpdatedViewHolder(vh, new ArrayList<>())); in reUseWithPayload() 125 assertTrue(mAnimator.canReuseUpdatedViewHolder(vh, Arrays.asList((Object) "a"))); in reUseWithPayload() 165 ViewHolder vh = createViewHolder(1); in animateAdd() local 166 expectItems(vh); in animateAdd() 167 assertTrue(animateAdd(vh)); in animateAdd() 174 ViewHolder vh = createViewHolder(1); in animateRemove() local 175 expectItems(vh); in animateRemove() 176 assertTrue(animateRemove(vh)); in animateRemove() 183 ViewHolder vh = createViewHolder(1); in animateMove() local [all …]
|
D | ChildHelperTest.java | 53 private RecyclerView.ViewHolder vh() { in vh() method in ChildHelperTest 65 RecyclerView.ViewHolder vh = vh(); in addChild() local 66 mChildHelper.addView(vh.itemView, false); in addChild() 68 assertFalse(mChildHelper.isHidden(vh.itemView)); in addChild() 74 RecyclerView.ViewHolder vh = vh(); in addChildHidden() local 75 mChildHelper.addView(vh.itemView, true); in addChildHidden() 77 assertTrue(mChildHelper.isHidden(vh.itemView)); in addChildHidden() 78 assertTrue(mLoggingCallback.mOnEnteredHiddenState.contains(vh.itemView)); in addChildHidden() 83 RecyclerView.ViewHolder vh = vh(); in addChildAndHide() local 84 mChildHelper.addView(vh.itemView, false); in addChildAndHide() [all …]
|
D | LinearLayoutManagerBaseConfigSetTest.java | 235 final RecyclerView.ViewHolder vh = mRecyclerView.findViewHolderForAdapterPosition(500); in dontRecycleViewsTranslatedOutOfBoundsFromStart() local 237 int gap = helper.getDecoratedStart(vh.itemView); in dontRecycleViewsTranslatedOutOfBoundsFromStart() 239 gap = helper.getDecoratedStart(vh.itemView); in dontRecycleViewsTranslatedOutOfBoundsFromStart() 242 final int size = helper.getDecoratedMeasurement(vh.itemView); in dontRecycleViewsTranslatedOutOfBoundsFromStart() 248 vh.itemView.setTranslationX(size * 2); in dontRecycleViewsTranslatedOutOfBoundsFromStart() 250 vh.itemView.setTranslationY(size * 2); in dontRecycleViewsTranslatedOutOfBoundsFromStart() 255 assertThat(collector.getDetached(), not(hasItem(sameInstance(vh.itemView)))); in dontRecycleViewsTranslatedOutOfBoundsFromStart() 256 assertThat(vh.itemView.getParent(), is((ViewParent) mRecyclerView)); in dontRecycleViewsTranslatedOutOfBoundsFromStart() 257 assertThat(vh.getAdapterPosition(), is(500)); in dontRecycleViewsTranslatedOutOfBoundsFromStart() 259 assertThat(collector.getDetached(), hasItem(sameInstance(vh.itemView))); in dontRecycleViewsTranslatedOutOfBoundsFromStart() [all …]
|
D | BaseRecyclerViewAnimationsTest.java | 125 … for (RecyclerView.ViewHolder vh : ((TestRecyclerView)mRecyclerView).collectViewHolders()) { in prepareLog() 126 builder.append(vh).append("\n"); in prepareLog() 129 for (RecyclerView.ViewHolder vh : recycler.getScrapList()) { in prepareLog() 130 builder.append(vh).append("\n"); in prepareLog() 270 for (RecyclerView.ViewHolder vh : recycler.mAttachedScrap) { in assertNoPreLayoutPosition() 271 assertPreLayoutPosition(vh); in assertNoPreLayoutPosition() 277 final RecyclerView.ViewHolder vh = mRecyclerView in assertNoPreLayoutPosition() local 279 assertPreLayoutPosition(vh); in assertNoPreLayoutPosition() 283 private void assertPreLayoutPosition(RecyclerView.ViewHolder vh) { in assertPreLayoutPosition() argument 285 + "layout position", RecyclerView.NO_POSITION, vh.mPreLayoutPosition); in assertPreLayoutPosition() [all …]
|
/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/widget/ |
D | PresenterTest.java | 64 Presenter.ViewHolder vh = p.onCreateViewHolder(new FrameLayout(mContext)); in testHeaderPresenter() local 65 p.onBindViewHolder(vh, null); in testHeaderPresenter() 68 vh.view.getVisibility() == expectedVisibility); in testHeaderPresenter() 69 p.onBindViewHolder(vh, new Row(null)); in testHeaderPresenter() 71 vh.view.getVisibility() == expectedVisibility); in testHeaderPresenter() 72 p.onBindViewHolder(vh, new Row(new HeaderItem(""))); in testHeaderPresenter() 74 vh.view.getVisibility() == View.VISIBLE); in testHeaderPresenter() 113 RowHeaderPresenter.ViewHolder vh = (RowHeaderPresenter.ViewHolder) in testRowHeaderPresenter() local 115 p.onBindViewHolder(vh, null); in testRowHeaderPresenter() 116 assertEquals("Header visibility", View.GONE, vh.view.getVisibility()); in testRowHeaderPresenter() [all …]
|
/frameworks/support/v17/leanback/src/android/support/v17/leanback/app/ |
D | RowsFragment.java | 209 ItemBridgeAdapter.ViewHolder vh = in setExpand() local 211 setRowViewExpanded(vh, mExpand); in setExpand() 319 static void setRowViewExpanded(ItemBridgeAdapter.ViewHolder vh, boolean expanded) { in setRowViewExpanded() argument 320 ((RowPresenter) vh.getPresenter()).setRowViewExpanded(vh.getViewHolder(), expanded); in setRowViewExpanded() 323 static void setRowViewSelected(ItemBridgeAdapter.ViewHolder vh, boolean selected, in setRowViewSelected() argument 325 RowViewHolderExtra extra = (RowViewHolderExtra) vh.getExtraObject(); in setRowViewSelected() 327 ((RowPresenter) vh.getPresenter()).setRowViewSelected(vh.getViewHolder(), selected); in setRowViewSelected() 340 public void onCreate(ItemBridgeAdapter.ViewHolder vh) { 346 setupSharedViewPool(vh); 348 vh.setExtraObject(new RowViewHolderExtra(vh)); [all …]
|
D | RowsSupportFragment.java | 206 ItemBridgeAdapter.ViewHolder vh = in setExpand() local 208 setRowViewExpanded(vh, mExpand); in setExpand() 316 static void setRowViewExpanded(ItemBridgeAdapter.ViewHolder vh, boolean expanded) { in setRowViewExpanded() argument 317 ((RowPresenter) vh.getPresenter()).setRowViewExpanded(vh.getViewHolder(), expanded); in setRowViewExpanded() 320 static void setRowViewSelected(ItemBridgeAdapter.ViewHolder vh, boolean selected, in setRowViewSelected() argument 322 RowViewHolderExtra extra = (RowViewHolderExtra) vh.getExtraObject(); in setRowViewSelected() 324 ((RowPresenter) vh.getPresenter()).setRowViewSelected(vh.getViewHolder(), selected); in setRowViewSelected() 337 public void onCreate(ItemBridgeAdapter.ViewHolder vh) { 343 setupSharedViewPool(vh); 345 vh.setExtraObject(new RowViewHolderExtra(vh)); [all …]
|
/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/app/ |
D | HeadersSupportFragmentTest.java | 69 ItemBridgeAdapter.ViewHolder vh = (ItemBridgeAdapter.ViewHolder) in defaultScale() local 71 assertTrue(vh.itemView.getScaleX() - 1.0f > 0.05f); in defaultScale() 72 assertTrue(vh.itemView.getScaleY() - 1.0f > 0.05f); in defaultScale() 97 ItemBridgeAdapter.ViewHolder vh = (ItemBridgeAdapter.ViewHolder) in disableScale() local 99 assertEquals(vh.itemView.getScaleX(), 1f, 0.001f); in disableScale() 100 assertEquals(vh.itemView.getScaleY(), 1f, 0.001f); in disableScale() 124 ItemBridgeAdapter.ViewHolder vh = (ItemBridgeAdapter.ViewHolder) in disableScaleInConstructor() local 126 assertEquals(vh.itemView.getScaleX(), 1f, 0.001f); in disableScaleInConstructor() 127 assertEquals(vh.itemView.getScaleY(), 1f, 0.001f); in disableScaleInConstructor()
|