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

Commit dec78800 authored by Chuck Liao's avatar Chuck Liao
Browse files

'Beta' tag for themed icon toggle

parent 3f62f8a2
Loading
Loading
Loading
Loading
+24 −0
Original line number Original line Diff line number Diff line
<!--
     Copyright (C) 2021 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    android:shape="rectangle">
    <size
        android:width="@dimen/beta_tag_background_width"
        android:height="@dimen/beta_tag_background_height" />
    <corners android:radius="@dimen/beta_tag_background_height" />
    <solid android:color="?androidprv:attr/colorAccentPrimary" />
</shape>
 No newline at end of file
+23 −4
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@
-->
-->
<com.android.customization.picker.themedicon.ThemedIconSectionView
<com.android.customization.picker.themedicon.ThemedIconSectionView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    android:layout_width="match_parent"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_height="wrap_content"
    android:background="?selectableItemBackground"
    android:background="?selectableItemBackground"
@@ -25,14 +26,32 @@
    android:paddingHorizontal="@dimen/section_horizontal_padding"
    android:paddingHorizontal="@dimen/section_horizontal_padding"
    android:paddingVertical="@dimen/section_vertical_padding">
    android:paddingVertical="@dimen/section_vertical_padding">


    <TextView
    <LinearLayout
        android:id="@+id/themed_icon_title"
        android:layout_width="0dp"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:layout_weight="1"
        android:orientation="horizontal">

        <TextView
            android:id="@+id/themed_icon_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/themed_icon_title"
            android:text="@string/themed_icon_title"
            style="@style/SectionTitleTextStyle" />
            style="@style/SectionTitleTextStyle" />


        <Space
            android:layout_width="12dp"
            android:layout_height="0dp" />

        <TextView
            android:id="@+id/beta_tag"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/beta_title"
            android:textColor="?androidprv:attr/textColorOnAccent"
            style="@style/BetaTagTextStyle" />
    </LinearLayout>

    <Switch
    <Switch
        android:id="@+id/themed_icon_toggle"
        android:id="@+id/themed_icon_toggle"
        android:layout_width="wrap_content"
        android:layout_width="wrap_content"
+3 −0
Original line number Original line Diff line number Diff line
@@ -120,4 +120,7 @@
    <dimen name="theme_info_app_preview_icon_margin">2dp</dimen>
    <dimen name="theme_info_app_preview_icon_margin">2dp</dimen>
    <dimen name="theme_info_app_preview_icon_elevation">2dp</dimen>
    <dimen name="theme_info_app_preview_icon_elevation">2dp</dimen>
    <dimen name="theme_info_text_size">28sp</dimen>
    <dimen name="theme_info_text_size">28sp</dimen>

    <dimen name="beta_tag_background_width">46dp</dimen>
    <dimen name="beta_tag_background_height">24dp</dimen>
</resources>
</resources>
+3 −0
Original line number Original line Diff line number Diff line
@@ -241,6 +241,9 @@
    <!-- Title of a section of the customization where the user can select color override for icon. [CHAR LIMIT=30] -->
    <!-- Title of a section of the customization where the user can select color override for icon. [CHAR LIMIT=30] -->
    <string name="themed_icon_title" msgid="4305612684940220645">Themed icons</string>
    <string name="themed_icon_title" msgid="4305612684940220645">Themed icons</string>


    <!-- Title of the tag to indicate beta version. [CHAR LIMIT=6] -->
    <string name="beta_title">Beta</string>

    <!-- The content description of grid picker entry. [CHAR LIMIT=NONE] -->
    <!-- The content description of grid picker entry. [CHAR LIMIT=NONE] -->
    <string name="gird_picker_entry_content_description" msgid="7538418512525897691">Change app grid</string>
    <string name="gird_picker_entry_content_description" msgid="7538418512525897691">Change app grid</string>
</resources>
</resources>
+8 −0
Original line number Original line Diff line number Diff line
@@ -115,4 +115,12 @@
        <item name="android:lineHeight">20dp</item>
        <item name="android:lineHeight">20dp</item>
    </style>
    </style>


    <style name="BetaTagTextStyle" parent="SectionTitleTextStyle">
        <item name="android:textSize">12sp</item>
        <item name="android:lineHeight">15dp</item>
        <item name="android:letterSpacing">0.02</item>
        <item name="android:background">@drawable/beta_tag_background</item>
        <item name="android:gravity">center</item>
    </style>

</resources>
</resources>