Contextual cards are not bound to homepage. Remove prefix homepage from
layout and theme names.
Next step: update names for some resource values (dimen/color etc)
Bug:
130250419
Test: rebuild
Change-Id: I5e901268462aaa37e00493080ae09af001784823
android:importantForAccessibility="no"/>
<!--dismissal view-->
- <include layout="@layout/homepage_dismissal_view"/>
+ <include layout="@layout/contextual_card_dismissal_view"/>
</FrameLayout>
</com.google.android.material.card.MaterialCardView>
\ No newline at end of file
</LinearLayout>
<!--dismissal view-->
- <include layout="@layout/homepage_dismissal_view"/>
+ <include layout="@layout/contextual_card_dismissal_view"/>
</FrameLayout>
</com.google.android.material.card.MaterialCardView>
\ No newline at end of file
*/
public class ConditionContextualCardRenderer implements ContextualCardRenderer {
@LayoutRes
- public static final int VIEW_TYPE_HALF_WIDTH = R.layout.homepage_condition_half_tile;
+ public static final int VIEW_TYPE_HALF_WIDTH = R.layout.conditional_card_half_tile;
@LayoutRes
- public static final int VIEW_TYPE_FULL_WIDTH = R.layout.homepage_condition_full_tile;
+ public static final int VIEW_TYPE_FULL_WIDTH = R.layout.conditional_card_full_tile;
private final Context mContext;
private final ControllerRendererPool mControllerRendererPool;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
public class ConditionFooterContextualCardRenderer implements ContextualCardRenderer {
- public static final int VIEW_TYPE = R.layout.homepage_condition_footer;
+ public static final int VIEW_TYPE = R.layout.conditional_card_footer;
private static final String TAG = "ConditionFooterRenderer";
private final Context mContext;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
public class ConditionHeaderContextualCardRenderer implements ContextualCardRenderer {
- public static final int VIEW_TYPE = R.layout.homepage_condition_header;
+ public static final int VIEW_TYPE = R.layout.conditional_card_header;
private static final String TAG = "ConditionHeaderRenderer";
private final Context mContext;
view.icons.removeAllViews();
headerCard.getConditionalCards().stream().forEach(card -> {
final ImageView icon = (ImageView) LayoutInflater.from(mContext).inflate(
- R.layout.homepage_condition_header_icon, view.icons, false);
+ R.layout.conditional_card_header_icon, view.icons, false);
icon.setImageDrawable(card.getIconDrawable());
view.icons.addView(icon);
});
public class LegacySuggestionContextualCardRenderer implements ContextualCardRenderer {
@LayoutRes
- public static final int VIEW_TYPE = R.layout.homepage_suggestion_tile;
+ public static final int VIEW_TYPE = R.layout.legacy_suggestion_tile;
private final Context mContext;
private final ControllerRendererPool mControllerRendererPool;
* Card renderer for {@link ContextualCard} built as slice full card or slice half card.
*/
public class SliceContextualCardRenderer implements ContextualCardRenderer, LifecycleObserver {
- public static final int VIEW_TYPE_FULL_WIDTH = R.layout.homepage_slice_tile;
- public static final int VIEW_TYPE_HALF_WIDTH = R.layout.homepage_slice_half_tile;
- public static final int VIEW_TYPE_DEFERRED_SETUP = R.layout.homepage_slice_deferred_setup_tile;
+ public static final int VIEW_TYPE_FULL_WIDTH = R.layout.contextual_slice_full_tile;
+ public static final int VIEW_TYPE_HALF_WIDTH = R.layout.contextual_slice_half_tile;
+ public static final int VIEW_TYPE_DEFERRED_SETUP = R.layout.contextual_slice_deferred_setup;
private static final String TAG = "SliceCardRenderer";