Home
last modified time | relevance | path

Searched refs:card (Results 1 – 25 of 89) sorted by relevance

1234

/packages/apps/ThemePicker/src/com/android/customization/picker/theme/
DThemePreviewPage.java67 TextView header = card.findViewById(R.id.theme_preview_card_header); in bindPreviewContent()
71 card.findViewById(R.id.theme_preview_top_bar).setVisibility(View.GONE); in bindPreviewContent()
72 card.findViewById(R.id.edit_label).setVisibility(View.GONE); in bindPreviewContent()
74 ViewGroup body = card.findViewById(R.id.theme_preview_card_body_container); in bindPreviewContent()
148 if (card == null) { in bindBody()
154 card.addOnLayoutChangeListener(listener); in bindBody()
160 card.requestLayout(); in bindBody()
164 CompoundButton button = card.findViewById(mColorButtonIds[i]); in bindBody()
175 ImageView bg = card.findViewById(mColorTileIds[i]); in bindBody()
177 ImageView fg = card.findViewById(mColorTileIconIds[i][0]); in bindBody()
[all …]
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/conditional/
DConditionContextualCardRenderer.java63 final ConditionalContextualCard card = (ConditionalContextualCard) contextualCard; in bindView() local
68 card.getMetricsConstant()); in bindView()
69 initializePrimaryClick(view, card, metricsFeatureProvider); in bindView()
70 initializeView(view, card); in bindView()
71 initializeActionButton(view, card, metricsFeatureProvider); in bindView()
74 private void initializePrimaryClick(ConditionalCardHolder view, ConditionalContextualCard card, in initializePrimaryClick() argument
80 card.getMetricsConstant()); in initializePrimaryClick()
82 card.getCardType()).onPrimaryClick(card); in initializePrimaryClick()
86 private void initializeView(ConditionalCardHolder view, ConditionalContextualCard card) { in initializeView() argument
87 view.icon.setImageDrawable(card.getIconDrawable()); in initializeView()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/conditional/
DConditionContextualCardRenderer.java63 final ConditionalContextualCard card = (ConditionalContextualCard) contextualCard; in bindView() local
68 card.getMetricsConstant()); in bindView()
69 initializePrimaryClick(view, card, metricsFeatureProvider); in bindView()
70 initializeView(view, card); in bindView()
71 initializeActionButton(view, card, metricsFeatureProvider); in bindView()
74 private void initializePrimaryClick(ConditionalCardHolder view, ConditionalContextualCard card, in initializePrimaryClick() argument
80 card.getMetricsConstant()); in initializePrimaryClick()
82 card.getCardType()).onPrimaryClick(card); in initializePrimaryClick()
86 private void initializeView(ConditionalCardHolder view, ConditionalContextualCard card) { in initializeView() argument
87 view.icon.setImageDrawable(card.getIconDrawable()); in initializeView()
[all …]
/packages/apps/ThemePicker/src/com/android/customization/picker/
DBasePreviewAdapter.java67 return view == ((PreviewPage) object).card; in isViewFromObject()
76 CardView card = (CardView) mInflater.inflate(mPreviewCardResId, container, false); in instantiateItem() local
79 page.setCard(card); in instantiateItem()
81 if (card.getParent() != null) { in instantiateItem()
82 container.removeView(card); in instantiateItem()
84 container.addView(card); in instantiateItem()
91 View card = ((PreviewPage) object).card; in destroyItem() local
92 ((PreviewPage) object).card = null; in destroyItem()
93 if (card.getParent() == container) { in destroyItem()
94 container.removeView(card); in destroyItem()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/
DContextualCardLoader.java114 final ContextualCard card = new ContextualCard(cursor); in loadInBackground() local
115 if (card.isCustomCard()) { in loadInBackground()
117 } else if (isLargeCard(card)) { in loadInBackground()
118 result.add(card.mutate().setIsLargeCard(true).build()); in loadInBackground()
120 result.add(card); in loadInBackground()
192 for (ContextualCard card : candidates) { in filterEligibleCards()
193 final EligibleCardChecker future = new EligibleCardChecker(mContext, card); in filterEligibleCards()
199 final ContextualCard card = cardFuture.get(ELIGIBILITY_CHECKER_TIMEOUT_MS, in filterEligibleCards() local
201 if (card != null) { in filterEligibleCards()
202 cards.add(card); in filterEligibleCards()
[all …]
DContextualCardFeatureProviderImpl.java107 public void logContextualCardDismiss(ContextualCard card) { in logContextualCardDismiss() argument
110 intent.putExtra(EXTRA_CONTEXTUALCARD_NAME, card.getName()); in logContextualCardDismiss()
111 intent.putExtra(EXTRA_CONTEXTUALCARD_URI, card.getSliceUri().toString()); in logContextualCardDismiss()
112 intent.putExtra(EXTRA_CONTEXTUALCARD_SCORE, card.getRankingScore()); in logContextualCardDismiss()
127 public void logContextualCardClick(ContextualCard card, int row, in logContextualCardClick() argument
131 intent.putExtra(EXTRA_CONTEXTUALCARD_NAME, card.getName()); in logContextualCardClick()
132 intent.putExtra(EXTRA_CONTEXTUALCARD_URI, card.getSliceUri().toString()); in logContextualCardClick()
133 intent.putExtra(EXTRA_CONTEXTUALCARD_SCORE, card.getRankingScore()); in logContextualCardClick()
168 cards.stream().forEach(card -> builder.addCard( in serialize()
170 .setSliceUri(card.getSliceUri().toString()) in serialize()
[all …]
DContextualCardManager.java129 for (ContextualCard card : mContextualCards) { in loadCardControllers()
130 setupController(card.getCardType()); in loadCardControllers()
175 .filter(card -> conditionalCardTypes.contains(card.getCardType())) in onContextualCardUpdated()
179 .filter(card -> !cardTypes.contains(card.getCardType())) in onContextualCardUpdated()
251 for (ContextualCard card : cards) { in onWindowFocusChanged()
253 .getController(mContext, card.getCardType()); in onWindowFocusChanged()
314 final ContextualCard card = cards.get(index); in getCardsWithDeferredSetupViewType() local
315 if (card.getCategory() == DEFERRED_SETUP_VALUE) { in getCardsWithDeferredSetupViewType()
316 result.set(index, card.mutate().setViewType( in getCardsWithDeferredSetupViewType()
329 .filter(card -> mSavedCards.contains(card.getName())) in getCardsToKeep()
[all …]
DContextualCardsAdapter.java72 final ContextualCard card = mContextualCards.get(position); in getItemViewType() local
73 return card.getViewType(); in getItemViewType()
86 final ContextualCard card = mContextualCards.get(position); in onBindViewHolder() local
88 mContext, mLifecycleOwner, card.getViewType()); in onBindViewHolder()
89 renderer.bindView(holder, card); in onBindViewHolder()
146 final ContextualCard card = mContextualCards.get(position).mutate() in onSwiped() local
148 mContextualCards.set(position, card); in onSwiped()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/
DContextualCardLoader.java111 final ContextualCard card = new ContextualCard(cursor); in loadInBackground() local
112 if (card.isCustomCard()) { in loadInBackground()
114 } else if (isLargeCard(card)) { in loadInBackground()
115 result.add(card.mutate().setIsLargeCard(true).build()); in loadInBackground()
117 result.add(card); in loadInBackground()
162 for (ContextualCard card : candidates) { in filterEligibleCards()
163 final EligibleCardChecker checker = new EligibleCardChecker(mContext, card); in filterEligibleCards()
169 final ContextualCard card = cardFuture.get(ELIGIBILITY_CHECKER_TIMEOUT_MS, in filterEligibleCards() local
171 if (card != null) { in filterEligibleCards()
172 cards.add(card); in filterEligibleCards()
[all …]
DContextualCardManager.java137 for (ContextualCard card : mContextualCards) { in loadCardControllers()
138 setupController(card.getCardType()); in loadCardControllers()
183 .filter(card -> conditionalCardTypes.contains(card.getCardType())) in onContextualCardUpdated()
187 .filter(card -> !cardTypes.contains(card.getCardType())) in onContextualCardUpdated()
265 for (ContextualCard card : cards) { in onWindowFocusChanged()
267 .getController(mContext, card.getCardType()); in onWindowFocusChanged()
343 final ContextualCard card = cards.get(index); in getCardsWithDeferredSetupViewType() local
344 if (card.getCategory() == DEFERRED_SETUP_VALUE) { in getCardsWithDeferredSetupViewType()
345 result.set(index, card.mutate().setViewType( in getCardsWithDeferredSetupViewType()
358 .filter(card -> mSavedCards.contains(card.getName())) in getCardsToKeep()
[all …]
DEligibleCardChecker.java51 EligibleCardChecker(Context context, ContextualCard card) { in EligibleCardChecker() argument
53 mCard = card; in EligibleCardChecker()
87 boolean isCardEligibleToDisplay(ContextualCard card) { in isCardEligibleToDisplay() argument
88 if (card.getRankingScore() < 0) { in isCardEligibleToDisplay()
91 if (card.isCustomCard()) { in isCardEligibleToDisplay()
95 final Uri uri = card.getSliceUri(); in isCardEligibleToDisplay()
103 mCard = card.mutate().setHasInlineAction(true).build(); in isCardEligibleToDisplay()
DContextualCardsAdapter.java72 final ContextualCard card = mContextualCards.get(position); in getItemViewType() local
73 return card.getViewType(); in getItemViewType()
86 final ContextualCard card = mContextualCards.get(position); in onBindViewHolder() local
88 mContext, mLifecycleOwner, card.getViewType()); in onBindViewHolder()
89 renderer.bindView(holder, card); in onBindViewHolder()
144 final ContextualCard card = mContextualCards.get(position).mutate() in onSwiped() local
146 mContextualCards.set(position, card); in onSwiped()
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/
DSliceContextualCardRendererTest.java122 final ContextualCard card = buildContextualCard( in bindView_isPendingDismiss_shouldShowDismissalView() local
125 mRenderer.bindView(viewHolder, card); in bindView_isPendingDismiss_shouldShowDismissalView()
133 final ContextualCard card = buildContextualCard( in bindView_isPendingDismiss_shouldAddViewHolderToSet() local
136 mRenderer.bindView(viewHolder, card); in bindView_isPendingDismiss_shouldAddViewHolderToSet()
144 final ContextualCard card = buildContextualCard(TEST_SLICE_URI); in bindView_beforeSuccessfulSliceBinding_shouldHideSwipeBackground() local
147 mRenderer.bindView(viewHolder, card); in bindView_beforeSuccessfulSliceBinding_shouldHideSwipeBackground()
155 final ContextualCard card = buildContextualCard(TEST_SLICE_URI); in bindView_reuseViewHolder_shouldHideSwipeBackgroundBeforeSliceBinding() local
160 mRenderer.bindView(viewHolder, card); in bindView_reuseViewHolder_shouldHideSwipeBackgroundBeforeSliceBinding()
168 final ContextualCard card = buildContextualCard(TEST_SLICE_URI); in bindView_deferredSetupCard_shouldNotCrash() local
171 mRenderer.bindView(viewHolder, card); in bindView_deferredSetupCard_shouldNotCrash()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/legacysuggestion/
DLegacySuggestionContextualCardRendererTest.java71 final ContextualCard card = buildContextualCard(); in bindView_shouldSetListener() local
72 final View cardView = LayoutInflater.from(mActivity).inflate(card.getViewType(), in bindView_shouldSetListener()
75 card.getViewType()); in bindView_shouldSetListener()
89 final ContextualCard card = buildContextualCard(); in bindView_closeButton_shouldSetListener() local
90 final View cardView = LayoutInflater.from(mActivity).inflate(card.getViewType(), in bindView_closeButton_shouldSetListener()
93 card.getViewType()); in bindView_closeButton_shouldSetListener()
108 final ContextualCard card = buildContextualCard(); in viewClick_shouldInvokeControllerPrimaryClick() local
109 final View cardView = LayoutInflater.from(mActivity).inflate(card.getViewType(), in viewClick_shouldInvokeControllerPrimaryClick()
112 card.getViewType()); in viewClick_shouldInvokeControllerPrimaryClick()
128 final ContextualCard card = buildContextualCard(); in viewClick_closeButton_shouldInvokeControllerDismissClick() local
[all …]
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/
DSliceContextualCardController.java59 public void onPrimaryClick(ContextualCard card) { in onPrimaryClick() argument
64 public void onActionClick(ContextualCard card) { in onActionClick() argument
69 public void onDismissed(ContextualCard card) { in onDismissed() argument
72 dbHelper.markContextualCardAsDismissed(mContext, card.getName()); in onDismissed()
74 showFeedbackDialog(card); in onDismissed()
81 ContextualCardLogUtils.buildCardDismissLog(card)); in onDismissed()
90 void showFeedbackDialog(ContextualCard card) { in showFeedbackDialog() argument
97 getSimpleCardName(card)); in showFeedbackDialog()
108 private String getSimpleCardName(ContextualCard card) { in getSimpleCardName() argument
109 final String[] split = card.getName().split("/"); in getSimpleCardName()
DSliceContextualCardRenderer.java96 public void bindView(RecyclerView.ViewHolder holder, ContextualCard card) { in bindView() argument
97 final Uri uri = card.getSliceUri(); in bindView()
134 mDeferredSetupCardHelper.bindView(holder, card, slice); in bindView()
136 mHalfCardHelper.bindView(holder, card, slice); in bindView()
138 mFullCardHelper.bindView(holder, card, slice); in bindView()
148 initDismissalActions(holder, card); in bindView()
150 initDismissalActions(holder, card); in bindView()
153 if (card.isPendingDismiss()) { in bindView()
159 private void initDismissalActions(RecyclerView.ViewHolder holder, ContextualCard card) { in initDismissalActions() argument
168 mControllerRendererPool.getController(mContext, card.getCardType()).onDismissed(card); in initDismissalActions()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/slices/
DSliceContextualCardController.java59 public void onPrimaryClick(ContextualCard card) { in onPrimaryClick() argument
64 public void onActionClick(ContextualCard card) { in onActionClick() argument
69 public void onDismissed(ContextualCard card) { in onDismissed() argument
72 dbHelper.markContextualCardAsDismissed(mContext, card.getName()); in onDismissed()
74 showFeedbackDialog(card); in onDismissed()
81 ContextualCardLogUtils.buildCardDismissLog(card)); in onDismissed()
90 void showFeedbackDialog(ContextualCard card) { in showFeedbackDialog() argument
97 getSimpleCardName(card)); in showFeedbackDialog()
108 private String getSimpleCardName(ContextualCard card) { in getSimpleCardName() argument
109 final String[] split = card.getName().split("/"); in getSimpleCardName()
DSliceContextualCardRenderer.java96 public void bindView(RecyclerView.ViewHolder holder, ContextualCard card) { in bindView() argument
97 final Uri uri = card.getSliceUri(); in bindView()
122 mDeferredSetupCardHelper.bindView(holder, card, slice); in bindView()
125 mHalfCardHelper.bindView(holder, card, slice); in bindView()
128 mFullCardHelper.bindView(holder, card, slice); in bindView()
137 initDismissalActions(holder, card); in bindView()
140 initDismissalActions(holder, card); in bindView()
143 if (card.isPendingDismiss()) { in bindView()
149 private void initDismissalActions(RecyclerView.ViewHolder holder, ContextualCard card) { in initDismissalActions() argument
158 mControllerRendererPool.getController(mContext, card.getCardType()).onDismissed(card); in initDismissalActions()
[all …]
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/logging/
DContextualCardLogUtils.java142 public static String buildCardClickLog(ContextualCard card, int sliceRow, int tapTarget, in buildCardClickLog() argument
145 log.append(card.getTextSliceUri()).append("|") in buildCardClickLog()
146 .append(card.getRankingScore()).append("|") in buildCardClickLog()
183 public static String buildCardDismissLog(ContextualCard card) { in buildCardDismissLog() argument
185 log.append(card.getTextSliceUri()) in buildCardDismissLog()
187 .append(card.getRankingScore()); in buildCardDismissLog()
219 for (ContextualCard card : cards) { in buildCardListLog()
220 log.append("|").append(card.getTextSliceUri()) in buildCardListLog()
221 .append("|").append(card.getRankingScore()); in buildCardListLog()
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/conditional/
DConditionFooterContextualCardRendererTest.java64 final ContextualCard card = generateConditionFooterContextualCard(); in bindView_shouldSetClickListener() local
65 final View view = LayoutInflater.from(mContext).inflate(card.getViewType(), recyclerView, in bindView_shouldSetClickListener()
68 card.getViewType()); in bindView_shouldSetClickListener()
72 mRenderer.bindView(viewHolder, card); in bindView_shouldSetClickListener()
82 final ContextualCard card = generateConditionFooterContextualCard(); in bindView_clickView_shouldSetTrueToIsConditionExpanded() local
83 final View view = LayoutInflater.from(mContext).inflate(card.getViewType(), recyclerView, in bindView_clickView_shouldSetTrueToIsConditionExpanded()
86 card.getViewType()); in bindView_clickView_shouldSetTrueToIsConditionExpanded()
90 mRenderer.bindView(viewHolder, card); in bindView_clickView_shouldSetTrueToIsConditionExpanded()
DConditionContextualCardRendererTest.java70 final ContextualCard card = buildConditionContextualCard(); in bindView_shouldSetListener() local
71 final View view = LayoutInflater.from(mActivity).inflate(card.getViewType(), recyclerView, in bindView_shouldSetListener()
74 card.getViewType()); in bindView_shouldSetListener()
79 mRenderer.bindView(viewHolder, card); in bindView_shouldSetListener()
89 final ContextualCard card = buildConditionContextualCard(); in viewClick_shouldInvokeControllerPrimaryClick() local
90 final View view = LayoutInflater.from(mActivity).inflate(card.getViewType(), recyclerView, in viewClick_shouldInvokeControllerPrimaryClick()
93 card.getViewType()); in viewClick_shouldInvokeControllerPrimaryClick()
98 mRenderer.bindView(viewHolder, card); in viewClick_shouldInvokeControllerPrimaryClick()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/logging/
DContextualCardLogUtils.java142 public static String buildCardClickLog(ContextualCard card, int sliceRow, int tapTarget, in buildCardClickLog() argument
145 log.append(card.getTextSliceUri()).append("|") in buildCardClickLog()
146 .append(card.getRankingScore()).append("|") in buildCardClickLog()
183 public static String buildCardDismissLog(ContextualCard card) { in buildCardDismissLog() argument
185 log.append(card.getTextSliceUri()) in buildCardDismissLog()
187 .append(card.getRankingScore()); in buildCardDismissLog()
219 for (ContextualCard card : cards) { in buildCardListLog()
220 log.append("|").append(card.getTextSliceUri()) in buildCardListLog()
221 .append("|").append(card.getRankingScore()); in buildCardListLog()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/legacysuggestion/
DLegacySuggestionContextualCardRenderer.java53 public void bindView(RecyclerView.ViewHolder holder, ContextualCard card) { in bindView() argument
56 .getController(mContext, card.getCardType()); in bindView()
57 vh.icon.setImageDrawable(card.getIconDrawable()); in bindView()
58 vh.title.setText(card.getTitleText()); in bindView()
59 vh.summary.setText(card.getSummaryText()); in bindView()
60 vh.itemView.setOnClickListener(v -> controller.onPrimaryClick(card)); in bindView()
61 vh.closeButton.setOnClickListener(v -> controller.onDismissed(card)); in bindView()
DLegacySuggestionContextualCardController.java80 public void onPrimaryClick(ContextualCard card) { in onPrimaryClick() argument
82 ((LegacySuggestionContextualCard) card).getPendingIntent().send(); in onPrimaryClick()
84 Log.w(TAG, "Failed to start suggestion " + card.getTitleText()); in onPrimaryClick()
89 public void onActionClick(ContextualCard card) { in onActionClick() argument
94 public void onDismissed(ContextualCard card) { in onDismissed() argument
96 .dismissSuggestions(((LegacySuggestionContextualCard)card).getSuggestion()); in onDismissed()
97 mSuggestions.remove(card); in onDismissed()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/legacysuggestion/
DLegacySuggestionContextualCardRenderer.java52 public void bindView(RecyclerView.ViewHolder holder, ContextualCard card) { in bindView() argument
54 vh.icon.setImageDrawable(card.getIconDrawable()); in bindView()
55 vh.title.setText(card.getTitleText()); in bindView()
56 vh.summary.setText(card.getSummaryText()); in bindView()
59 card.getCardType()).onPrimaryClick(card)); in bindView()

1234