summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Settings/res-twopanel/drawable/ic_settings_eco_base.xml8
-rw-r--r--Settings/res-twopanel/drawable/ic_settings_energy_saver_base.xml11
-rw-r--r--Settings/res/drawable/ic_eco_leaf.xml6
-rw-r--r--Settings/res/drawable/ic_energy_mode_high.xml10
-rw-r--r--Settings/res/drawable/ic_energy_mode_moderate.xml8
-rw-r--r--Settings/res/drawable/ic_leaf.xml25
-rw-r--r--Settings/res/drawable/ic_settings_eco.xml8
-rw-r--r--Settings/src/com/android/tv/settings/device/eco/EnergyModesFragment.java2
-rw-r--r--TwoPanelSettingsLib/res/layout/energy_mode_info_fragment.xml166
-rw-r--r--TwoPanelSettingsLib/res/values/dimens.xml1
-rw-r--r--color-check-baseline.xml30
11 files changed, 143 insertions, 132 deletions
diff --git a/Settings/res-twopanel/drawable/ic_settings_eco_base.xml b/Settings/res-twopanel/drawable/ic_settings_eco_base.xml
index fa03d7dea..9f7a1aed1 100644
--- a/Settings/res-twopanel/drawable/ic_settings_eco_base.xml
+++ b/Settings/res-twopanel/drawable/ic_settings_eco_base.xml
@@ -15,14 +15,14 @@
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
+ android:width="48dp"
+ android:height="48dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/preference_icon_color"
- android:pathData="M9.73,12.85c-0.39,0.39 -0.39,1.02 0,1.41c0.39,0.39 1.02,0.39 1.41,0l1.56,-1.56c0.39,-0.39 0.39,-1.02 0,-1.41c-0.39,-0.39 -1.02,-0.39 -1.41,0L9.73,12.85z"/>
+ android:pathData="M9.73 12.85C9.34 13.24 9.34 13.87 9.73 14.26C10.12 14.65 10.75 14.65 11.14 14.26L12.7 12.7C13.09 12.31 13.09 11.68 12.7 11.29C12.31 10.9 11.68 10.9 11.29 11.29L9.73 12.85Z"/>
<path
android:fillColor="@color/preference_icon_color"
- android:pathData="M20.31,8.56l-0.54,-4.33l-4.33,-0.54L12,1L8.56,3.69L4.22,4.22L3.69,8.56L1,12l2.69,3.44l0.54,4.33l4.33,0.54L12,23l3.44,-2.69l4.33,-0.54l0.54,-4.33L23,12L20.31,8.56zM16,12.5c0,2.41 -1.94,4.5 -4.5,4.5c-0.88,0 -1.69,-0.26 -2.39,-0.7l-0.41,0.41c-0.39,0.39 -1.02,0.39 -1.41,0c-0.39,-0.39 -0.39,-1.02 0,-1.41l0.41,-0.41C7.26,14.19 7,13.38 7,12.5C7,9.93 9.1,8 11.5,8c0,0 0,0 0,0H16V12.5z"/>
+ android:pathData="M20.31 8.56L19.77 4.23L15.44 3.69L12 1L8.56 3.69L4.22 4.22L3.69 8.56L1 12L3.69 15.44L4.23 19.77L8.56 20.31L12 23L15.44 20.31L19.77 19.77L20.31 15.44L23 12L20.31 8.56ZM16 12.5C16 14.91 14.06 17 11.5 17C10.62 17 9.81 16.74 9.11 16.3L8.7 16.71C8.31 17.1 7.68 17.1 7.29 16.71C6.9 16.32 6.9 15.69 7.29 15.3L7.7 14.89C7.26 14.19 7 13.38 7 12.5C7 9.93 9.1 8 11.5 8H16V12.5Z"/>
</vector>
diff --git a/Settings/res-twopanel/drawable/ic_settings_energy_saver_base.xml b/Settings/res-twopanel/drawable/ic_settings_energy_saver_base.xml
index 893bcd43f..48b539078 100644
--- a/Settings/res-twopanel/drawable/ic_settings_energy_saver_base.xml
+++ b/Settings/res-twopanel/drawable/ic_settings_energy_saver_base.xml
@@ -16,12 +16,13 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="40dp"
- android:height="40dp"
- android:viewportWidth="40"
- android:viewportHeight="40"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@color/preference_icon_color"
- android:pathData="M14.75,4.458V1.417H25.25V4.458ZM18.5,23.208H21.5V13.458H18.5ZM20,37.167Q16.833,37.167 14.062,35.958Q11.292,34.75 9.208,32.667Q7.125,30.583 5.917,27.812Q4.708,25.042 4.708,21.875Q4.708,18.708 5.917,15.938Q7.125,13.167 9.208,11.083Q11.292,9 14.062,7.792Q16.833,6.583 20,6.583Q22.75,6.583 25.208,7.479Q27.667,8.375 29.625,10.042L31.958,7.75L34.083,9.875L31.792,12.167Q33.333,14 34.312,16.396Q35.292,18.792 35.292,21.875Q35.292,25.042 34.083,27.812Q32.875,30.583 30.792,32.667Q28.708,34.75 25.938,35.958Q23.167,37.167 20,37.167ZM20,34Q25.042,34 28.583,30.458Q32.125,26.917 32.125,21.875Q32.125,16.833 28.583,13.292Q25.042,9.75 20,9.75Q14.958,9.75 11.417,13.292Q7.875,16.833 7.875,21.875Q7.875,26.917 11.417,30.458Q14.958,34 20,34ZM20,21.917Q20,21.917 20,21.917Q20,21.917 20,21.917Q20,21.917 20,21.917Q20,21.917 20,21.917Q20,21.917 20,21.917Q20,21.917 20,21.917Q20,21.917 20,21.917Q20,21.917 20,21.917Z"/>
+ android:fillType="evenOdd"
+ android:pathData="M8.99998 2.33334H15.6666V0.111115H8.99998V2.33334ZM11.2222 14.5556V7.88889H13.4444V14.5556H11.2222ZM22.3333 13.4556C22.3333 18.9778 17.8666 23.4556 12.3333 23.4556C6.79998 23.4556 2.33331 18.9778 2.33331 13.4556C2.33331 7.93334 6.81109 3.45556 12.3333 3.45556C14.6889 3.45556 16.8555 4.27778 18.5778 5.65556L20.1555 4.07778C20.7222 4.54445 21.2444 5.07778 21.7222 5.64445L20.1444 7.22223C21.5111 8.92223 22.3333 11.1 22.3333 13.4556ZM12.3333 5.67778C16.6333 5.67778 20.1111 9.15556 20.1111 13.4556C20.1111 17.7556 16.6333 21.2333 12.3333 21.2333C8.03331 21.2333 4.55554 17.7556 4.55554 13.4556C4.55554 9.15556 8.03331 5.67778 12.3333 5.67778Z"/>
</vector>
diff --git a/Settings/res/drawable/ic_eco_leaf.xml b/Settings/res/drawable/ic_eco_leaf.xml
index 0dc0016a3..f4803785c 100644
--- a/Settings/res/drawable/ic_eco_leaf.xml
+++ b/Settings/res/drawable/ic_eco_leaf.xml
@@ -17,10 +17,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
- android:viewportWidth="48"
- android:viewportHeight="48"
+ android:viewportWidth="960"
+ android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@color/preference_icon_color"
- android:pathData="M33.85,16Q38.25,21.1 39.95,26.075Q41.65,31.05 41.9,35.05Q42.25,39.7 41.2,43.95Q40.7,44 39.6,44Q32.05,44 25.575,40.875Q19.1,37.75 14.15,32Q9.75,26.9 8.05,21.925Q6.35,16.95 6.1,12.95Q5.75,8.3 6.8,4.05Q7.3,4 8.4,4Q15.95,4 22.425,7.125Q28.9,10.25 33.85,16ZM37.9,39.95Q38.45,34.45 36.575,28.8Q34.7,23.15 30.8,18.6Q26.75,13.9 21.525,11.175Q16.3,8.45 10.1,8.05Z"/>
+ android:pathData="M637.26,352.09Q707.63,433.73 734.81,513.36Q762,593 766.58,656.82Q773,731 756.12,799.2Q748.08,800 730.39,800Q609,800 505.05,749.93Q401.1,699.85 321.64,607.72Q251,526 223.8,446.56Q196.6,367.12 192.6,303.25Q187,229 203.88,160.8Q211.92,160 229.61,160Q351,160 454.55,210.02Q558.1,260.05 637.26,352.09ZM702,735Q711,647 681.5,556Q652,465 589.21,392.69Q524,318 440.5,275Q357,232 258,225L702,735Z"/>
</vector>
diff --git a/Settings/res/drawable/ic_energy_mode_high.xml b/Settings/res/drawable/ic_energy_mode_high.xml
index 95f7f0646..1b6534d43 100644
--- a/Settings/res/drawable/ic_energy_mode_high.xml
+++ b/Settings/res/drawable/ic_energy_mode_high.xml
@@ -15,12 +15,12 @@
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="48dp"
- android:height="48dp"
- android:viewportWidth="48"
- android:viewportHeight="48"
+ android:width="20dp"
+ android:height="20dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="#FFFFFFFF"
- android:pathData="M18.3,41.75 L20.3,28H11.8L26.75,6.4H27.7L25.75,22H35.75L19.25,41.75Z"/>
+ android:pathData="M10.4386 22H9.32786L10.4386 14.2222H6.55113C5.90693 14.2222 5.91804 13.8667 6.12907 13.4889C6.3401 13.1111 6.18461 13.4 6.20682 13.3556C7.63961 10.8222 9.79435 7.04444 12.6599 2H13.7706L12.6599 9.77778H16.5474C17.0916 9.77778 17.1693 10.1444 17.0694 10.3444L16.9916 10.5111C12.6155 18.1667 10.4386 22 10.4386 22Z"/>
</vector>
diff --git a/Settings/res/drawable/ic_energy_mode_moderate.xml b/Settings/res/drawable/ic_energy_mode_moderate.xml
index 5771669dc..c92d55e12 100644
--- a/Settings/res/drawable/ic_energy_mode_moderate.xml
+++ b/Settings/res/drawable/ic_energy_mode_moderate.xml
@@ -16,12 +16,12 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="14dp"
+ android:width="20dp"
android:height="20dp"
- android:viewportWidth="14"
- android:viewportHeight="20">
+ android:viewportWidth="24"
+ android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
- android:pathData="M4 19C4 19.55 4.45 20 5 20H9C9.55 20 10 19.55 10 19V18H4V19ZM7 0C3.13 0 0 3.13 0 7C0 9.38 1.19 11.47 3 12.74V15C3 15.55 3.45 16 4 16H10C10.55 16 11 15.55 11 15V12.74C12.81 11.47 14 9.38 14 7C14 3.13 10.87 0 7 0Z" />
+ android:pathData="M12.1111 6.65657C9.10018 6.65657 6.65654 9.10021 6.65654 12.1111C6.65654 15.122 9.10018 17.5657 12.1111 17.5657C15.122 17.5657 17.5656 15.122 17.5656 12.1111C17.5656 9.10021 15.122 6.65657 12.1111 6.65657ZM1.20199 13.202H3.38381C3.98381 13.202 4.47472 12.7111 4.47472 12.1111C4.47472 11.5111 3.98381 11.0202 3.38381 11.0202H1.20199C0.601993 11.0202 0.111084 11.5111 0.111084 12.1111C0.111084 12.7111 0.601993 13.202 1.20199 13.202ZM20.8384 13.202H23.0202C23.6202 13.202 24.1111 12.7111 24.1111 12.1111C24.1111 11.5111 23.6202 11.0202 23.0202 11.0202H20.8384C20.2384 11.0202 19.7474 11.5111 19.7474 12.1111C19.7474 12.7111 20.2384 13.202 20.8384 13.202ZM11.0202 1.20202V3.38384C11.0202 3.98384 11.5111 4.47475 12.1111 4.47475C12.7111 4.47475 13.202 3.98384 13.202 3.38384V1.20202C13.202 0.602024 12.7111 0.111115 12.1111 0.111115C11.5111 0.111115 11.0202 0.602024 11.0202 1.20202ZM11.0202 20.8384V23.0202C11.0202 23.6202 11.5111 24.1111 12.1111 24.1111C12.7111 24.1111 13.202 23.6202 13.202 23.0202V20.8384C13.202 20.2384 12.7111 19.7475 12.1111 19.7475C11.5111 19.7475 11.0202 20.2384 11.0202 20.8384ZM5.55472 4.01657C5.12927 3.59111 4.43108 3.59111 4.01654 4.01657C3.59108 4.44202 3.59108 5.14021 4.01654 5.55475L5.1729 6.71111C5.59836 7.13657 6.29654 7.13657 6.71108 6.71111C7.12563 6.28566 7.13654 5.58748 6.71108 5.17293L5.55472 4.01657ZM19.0493 17.5111C18.6238 17.0857 17.9256 17.0857 17.5111 17.5111C17.0856 17.9366 17.0856 18.6348 17.5111 19.0493L18.6674 20.2057C19.0929 20.6311 19.7911 20.6311 20.2056 20.2057C20.6311 19.7802 20.6311 19.082 20.2056 18.6675L19.0493 17.5111ZM20.2056 5.55475C20.6311 5.1293 20.6311 4.43111 20.2056 4.01657C19.7802 3.59111 19.082 3.59111 18.6674 4.01657L17.5111 5.17293C17.0856 5.59839 17.0856 6.29657 17.5111 6.71111C17.9365 7.12566 18.6347 7.13657 19.0493 6.71111L20.2056 5.55475ZM6.71108 19.0493C7.13654 18.6238 7.13654 17.9257 6.71108 17.5111C6.28563 17.0857 5.58745 17.0857 5.1729 17.5111L4.01654 18.6675C3.59108 19.0929 3.59108 19.7911 4.01654 20.2057C4.44199 20.6202 5.14017 20.6311 5.55472 20.2057L6.71108 19.0493Z" />
</vector> \ No newline at end of file
diff --git a/Settings/res/drawable/ic_leaf.xml b/Settings/res/drawable/ic_leaf.xml
deleted file mode 100644
index f23e2d9f9..000000000
--- a/Settings/res/drawable/ic_leaf.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
- ~ Copyright (C) 2023 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.
- -->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="48dp"
- android:height="48dp"
- android:viewportWidth="48"
- android:viewportHeight="48"
- android:tint="?attr/colorControlNormal">
- <path
- android:fillColor="#FFFFFFFF"
- android:pathData="M33.85,16Q38.25,21.1 39.95,26.075Q41.65,31.05 41.9,35.05Q42.25,39.7 41.2,43.95Q40.7,44 39.6,44Q32.05,44 25.575,40.875Q19.1,37.75 14.15,32Q9.75,26.9 8.05,21.925Q6.35,16.95 6.1,12.95Q5.75,8.3 6.8,4.05Q7.3,4 8.4,4Q15.95,4 22.425,7.125Q28.9,10.25 33.85,16ZM37.9,39.95Q38.45,34.45 36.575,28.8Q34.7,23.15 30.8,18.6Q26.75,13.9 21.525,11.175Q16.3,8.45 10.1,8.05Z"/>
-</vector>
diff --git a/Settings/res/drawable/ic_settings_eco.xml b/Settings/res/drawable/ic_settings_eco.xml
index e04416651..bb0c3df01 100644
--- a/Settings/res/drawable/ic_settings_eco.xml
+++ b/Settings/res/drawable/ic_settings_eco.xml
@@ -15,15 +15,15 @@
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
+ android:width="48dp"
+ android:height="48dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="#FFFFFFFF"
- android:pathData="M9.73,12.85c-0.39,0.39 -0.39,1.02 0,1.41c0.39,0.39 1.02,0.39 1.41,0l1.56,-1.56c0.39,-0.39 0.39,-1.02 0,-1.41c-0.39,-0.39 -1.02,-0.39 -1.41,0L9.73,12.85z"/>
+ android:pathData="M9.73 12.85C9.34 13.24 9.34 13.87 9.73 14.26C10.12 14.65 10.75 14.65 11.14 14.26L12.7 12.7C13.09 12.31 13.09 11.68 12.7 11.29C12.31 10.9 11.68 10.9 11.29 11.29L9.73 12.85Z"/>
<path
android:fillColor="#FFFFFFFF"
- android:pathData="M20.31,8.56l-0.54,-4.33l-4.33,-0.54L12,1L8.56,3.69L4.22,4.22L3.69,8.56L1,12l2.69,3.44l0.54,4.33l4.33,0.54L12,23l3.44,-2.69l4.33,-0.54l0.54,-4.33L23,12L20.31,8.56zM16,12.5c0,2.41 -1.94,4.5 -4.5,4.5c-0.88,0 -1.69,-0.26 -2.39,-0.7l-0.41,0.41c-0.39,0.39 -1.02,0.39 -1.41,0c-0.39,-0.39 -0.39,-1.02 0,-1.41l0.41,-0.41C7.26,14.19 7,13.38 7,12.5C7,9.93 9.1,8 11.5,8c0,0 0,0 0,0H16V12.5z"/>
+ android:pathData="M20.31 8.56L19.77 4.23L15.44 3.69L12 1L8.56 3.69L4.22 4.22L3.69 8.56L1 12L3.69 15.44L4.23 19.77L8.56 20.31L12 23L15.44 20.31L19.77 19.77L20.31 15.44L23 12L20.31 8.56ZM16 12.5C16 14.91 14.06 17 11.5 17C10.62 17 9.81 16.74 9.11 16.3L8.7 16.71C8.31 17.1 7.68 17.1 7.29 16.71C6.9 16.32 6.9 15.69 7.29 15.3L7.7 14.89C7.26 14.19 7 13.38 7 12.5C7 9.93 9.1 8 11.5 8H16V12.5Z"/>
</vector>
diff --git a/Settings/src/com/android/tv/settings/device/eco/EnergyModesFragment.java b/Settings/src/com/android/tv/settings/device/eco/EnergyModesFragment.java
index 3dcbcfb56..c645b3b58 100644
--- a/Settings/src/com/android/tv/settings/device/eco/EnergyModesFragment.java
+++ b/Settings/src/com/android/tv/settings/device/eco/EnergyModesFragment.java
@@ -187,7 +187,7 @@ public class EnergyModesFragment extends SettingsPreferenceFragment {
ecoHintIcon.setImageResource(mode.ecoHintIconRes);
if (mode.ecoHighlighted) {
- titleIcon.setImageResource(R.drawable.ic_leaf);
+ titleIcon.setImageResource(R.drawable.ic_eco_leaf);
} else {
titleIcon.setImageResource(R.drawable.ic_info_outline_base);
}
diff --git a/TwoPanelSettingsLib/res/layout/energy_mode_info_fragment.xml b/TwoPanelSettingsLib/res/layout/energy_mode_info_fragment.xml
index 2dfe2aa5c..64ebb9f86 100644
--- a/TwoPanelSettingsLib/res/layout/energy_mode_info_fragment.xml
+++ b/TwoPanelSettingsLib/res/layout/energy_mode_info_fragment.xml
@@ -15,86 +15,104 @@
~ limitations under the License.
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/main_frame1"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:transitionGroup="false">
-
- <RelativeLayout
+<androidx.constraintlayout.widget.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/main_frame1"
+ android:layout_gravity="bottom"
+ android:importantForAccessibility="yes"
android:layout_width="@dimen/settings_info_fragment_bottom_section_width"
android:layout_height="wrap_content"
- android:layout_alignParentStart="true"
- android:layout_alignParentBottom="true"
- android:focusable="true"
- android:importantForAccessibility="yes"
+ android:transitionGroup="false"
android:layout_marginBottom="@dimen/settings_info_fragment_bottom_section_margin_bottom"
- android:paddingEnd="@dimen/settings_info_fragment_bottom_section_padding_end" >
+ android:paddingEnd="@dimen/settings_info_fragment_bottom_section_padding_end">
- <ImageView
- android:id="@+id/info_title_icon"
- android:layout_width="@dimen/settings_info_fragment_title_icon_width"
- android:layout_height="@dimen/settings_info_fragment_title_icon_width"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true"
- android:focusable="false"
- android:importantForAccessibility="no"
- android:layout_marginEnd="@dimen/settings_info_fragment_title_icon_margin_end"
- android:clickable="false" />
+ <ImageView
+ android:id="@+id/info_title_icon"
+ android:layout_width="@dimen/settings_info_fragment_title_icon_width"
+ android:layout_height="@dimen/settings_info_fragment_title_icon_width"
+ android:tint="@color/info_title_text_color"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="@id/info_title_barrier"
+ android:focusable="false"
+ android:importantForAccessibility="no"
+ android:clickable="false" />
- <TextView
- android:id="@+id/info_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toEndOf="@id/info_title_icon"
- android:layout_alignParentTop="true"
- android:layout_alignWithParentIfMissing="true"
- android:layout_marginBottom="@dimen/settings_info_fragment_title_margin_bottom"
- android:focusable="false"
- android:importantForAccessibility="yes"
- android:maxLines="2"
- android:ellipsize="end"
- style="@style/TwoPanelInfoTitleTextStyle"/>
+ <TextView
+ android:id="@+id/info_title"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/settings_info_fragment_title_icon_margin_end"
+ android:ellipsize="end"
+ android:focusable="false"
+ android:importantForAccessibility="yes"
+ android:maxLines="2"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toEndOf="@id/info_title_icon"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="@id/info_title_barrier"
+ style="@style/TwoPanelInfoTitleTextStyle" />
- <TextView
- android:id="@+id/info_summary"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_toEndOf="@id/info_title_icon"
- android:layout_below="@id/info_title"
- android:layout_alignWithParentIfMissing="true"
- android:layout_marginBottom="@dimen/settings_info_fragment_title_margin_bottom"
- android:focusable="false"
- android:importantForAccessibility="yes"
- android:maxLines="12"
- android:ellipsize="end"
- style="@style/TwoPanelInfoSummaryTextStyle"/>
+ <androidx.constraintlayout.widget.Barrier
+ android:id="@+id/info_title_barrier"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:barrierDirection="bottom"
+ app:constraint_referenced_ids="info_title_icon,info_title"
+ />
- <ImageView
- android:id="@+id/eco_hint_icon"
- android:layout_width="@dimen/settings_info_fragment_title_icon_width"
- android:layout_height="@dimen/settings_info_fragment_title_icon_width"
- android:layout_alignParentStart="true"
- android:layout_below="@id/info_summary"
- android:focusable="false"
- android:importantForAccessibility="no"
- android:layout_marginEnd="@dimen/settings_info_fragment_title_icon_margin_end"
- android:tint="@color/eco_hint_color"
- android:clickable="false" />
+ <TextView
+ android:id="@+id/info_summary"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/settings_info_fragment_title_margin_bottom"
+ android:ellipsize="end"
+ android:focusable="false"
+ android:importantForAccessibility="yes"
+ android:maxLines="12"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="@id/info_title"
+ app:layout_constraintTop_toBottomOf="@id/info_title_barrier"
+ app:layout_constraintBottom_toBottomOf="@id/eco_hint_barrier"
+ style="@style/TwoPanelInfoSummaryTextStyle" />
+
+ <androidx.constraintlayout.widget.Barrier
+ android:id="@+id/eco_hint_barrier"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:layout_constraintTop_toBottomOf="@id/info_summary"
+ app:barrierDirection="top"
+ app:constraint_referenced_ids="eco_hint,eco_hint_icon"
+ />
- <TextView
- android:id="@+id/eco_hint"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_toEndOf="@id/eco_hint_icon"
- android:layout_below="@id/info_summary"
- android:layout_alignWithParentIfMissing="true"
- android:focusable="false"
- android:importantForAccessibility="yes"
- android:maxLines="12"
- android:ellipsize="end"
- style="@style/EcoHintTextStyle"/>
- </RelativeLayout>
+ <ImageView
+ android:id="@+id/eco_hint_icon"
+ android:layout_width="@dimen/settings_info_fragment_title_icon_width"
+ android:layout_height="@dimen/settings_info_fragment_title_icon_width"
+ android:layout_marginTop="@dimen/settings_eco_info_fragment_hint_margin_top"
+ android:clickable="false"
+ android:focusable="false"
+ android:importantForAccessibility="no"
+ android:tint="@color/eco_hint_color"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/eco_hint_barrier" />
+
+ <TextView
+ android:id="@+id/eco_hint"
+ style="@style/EcoHintTextStyle"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_marginTop="@dimen/settings_eco_info_fragment_hint_margin_top"
+ android:ellipsize="end"
+ android:focusable="false"
+ android:importantForAccessibility="yes"
+ android:maxLines="12"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="@id/info_title"
+ app:layout_constraintTop_toBottomOf="@id/eco_hint_barrier" />
-</RelativeLayout> \ No newline at end of file
+</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/TwoPanelSettingsLib/res/values/dimens.xml b/TwoPanelSettingsLib/res/values/dimens.xml
index f89382069..556521c9c 100644
--- a/TwoPanelSettingsLib/res/values/dimens.xml
+++ b/TwoPanelSettingsLib/res/values/dimens.xml
@@ -62,4 +62,5 @@
<dimen name="settings_info_fragment_title_text_max_width_long">240dp</dimen>
<dimen name="settings_info_fragment_title_text_max_width_short">200dp</dimen>
<dimen name="settings_info_fragment_summary_text_size">12sp</dimen>
+ <dimen name="settings_eco_info_fragment_hint_margin_top">16dp</dimen>
</resources>
diff --git a/color-check-baseline.xml b/color-check-baseline.xml
index 48f9acccc..c5a8fc1a8 100644
--- a/color-check-baseline.xml
+++ b/color-check-baseline.xml
@@ -2525,7 +2525,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="Settings/res/values/energy-modes.xml"
- line="25"
+ line="29"
column="5"/>
</issue>
@@ -2541,7 +2541,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="Settings/res/values/energy-modes.xml"
- line="47"
+ line="51"
column="5"/>
</issue>
@@ -2557,7 +2557,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="Settings/res/values/energy-modes.xml"
- line="69"
+ line="73"
column="5"/>
</issue>
@@ -2569,12 +2569,28 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" android:tint=&quot;@color/eco_hint_color&quot;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" android:tint=&quot;@color/info_title_text_color&quot;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="TwoPanelSettingsLib/res/layout/energy_mode_info_fragment.xml"
- line="83"
- column="13"/>
+ line="37"
+ column="9"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:tint=&quot;@color/eco_hint_color&quot;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="TwoPanelSettingsLib/res/layout/energy_mode_info_fragment.xml"
+ line="79"
+ column="9"/>
</issue>
<issue