Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db87e153 authored by El Dainosor's avatar El Dainosor Committed by Eamon Powell
Browse files

ThemePicker: Show item name under the category name

When selecting an option, the name will show up for the
respective font, icon, accent colour or shape.

Change-Id: I834dbf30301dba47b1a7e850940af32e92c14b2d
parent c86de5e1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@
            android:layout_gravity="center_horizontal"
            android:drawablePadding="@dimen/theme_preview_header_drawable_padding"
            android:textAppearance="@style/CardTitleTextAppearance"
            android:gravity="center_horizontal"
            app:layout_constraintBottom_toTopOf="@id/theme_preview_card_body_container"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.5"
+12 −0
Original line number Diff line number Diff line
@@ -146,6 +146,9 @@ public abstract class ThemeComponentOption implements CustomizationOption<ThemeC
            }
            TextView title = container.findViewById(R.id.font_card_title);
            title.setTypeface(mHeadlineFont);
            TextView header = container.findViewById(R.id.theme_preview_card_header);
            header.setText(String.format("%s\n(%s)",
                    container.getContext().getString(R.string.preview_name_font), mLabel));
            TextView bodyText = container.findViewById(R.id.font_card_body);
            bodyText.setTypeface(mBodyFont);
            container.findViewById(R.id.font_card_divider).setBackgroundColor(
@@ -225,6 +228,9 @@ public abstract class ThemeComponentOption implements CustomizationOption<ThemeC
        public void bindPreview(ViewGroup container) {
            bindPreviewHeader(container, R.string.preview_name_icon, R.drawable.ic_wifi_24px);

            TextView header = container.findViewById(R.id.theme_preview_card_header);
            header.setText(String.format("%s\n(%s)",
                    container.getContext().getString(R.string.preview_name_icon), mLabel));
            ViewGroup cardBody = container.findViewById(R.id.theme_preview_card_body_container);
            if (cardBody.getChildCount() == 0) {
                LayoutInflater.from(container.getContext()).inflate(
@@ -342,6 +348,9 @@ public abstract class ThemeComponentOption implements CustomizationOption<ThemeC
        public void bindPreview(ViewGroup container) {
            bindPreviewHeader(container, R.string.preview_name_color, R.drawable.ic_colorize_24px);

            TextView header = container.findViewById(R.id.theme_preview_card_header);
            header.setText(String.format("%s\n(%s)",
                    container.getContext().getString(R.string.preview_name_color), mLabel));
            ViewGroup cardBody = container.findViewById(R.id.theme_preview_card_body_container);
            if (cardBody.getChildCount() == 0) {
                LayoutInflater.from(container.getContext()).inflate(
@@ -482,6 +491,9 @@ public abstract class ThemeComponentOption implements CustomizationOption<ThemeC
        public void bindPreview(ViewGroup container) {
            bindPreviewHeader(container, R.string.preview_name_shape, R.drawable.ic_shapes_24px);

            TextView header = container.findViewById(R.id.theme_preview_card_header);
            header.setText(String.format("%s\n(%s)",
                    container.getContext().getString(R.string.preview_name_shape), mLabel));
            ViewGroup cardBody = container.findViewById(R.id.theme_preview_card_body_container);
            if (cardBody.getChildCount() == 0) {
                LayoutInflater.from(container.getContext()).inflate(