summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2019-05-13 23:23:05 -0700
committerHyunyoung Song <hyunyoungs@google.com>2019-05-14 10:15:11 -0700
commite751d90c449b388266f8ccf637e090a44b4f31cd (patch)
tree511fba9ff08ed9c1f7f732e6ce5db503edb651eb /res
parentc857ad80491450eab30866f9c3f4b2c090776bea (diff)
downloadandroid_packages_apps_Trebuchet-e751d90c449b388266f8ccf637e090a44b4f31cd.tar.gz
android_packages_apps_Trebuchet-e751d90c449b388266f8ccf637e090a44b4f31cd.tar.bz2
android_packages_apps_Trebuchet-e751d90c449b388266f8ccf637e090a44b4f31cd.zip
Implement 3 shades of folder icon/container fill color
Bug: 130451254 Change-Id: I36d885a2b0247f1bb84cb98073459853ae723331
Diffstat (limited to 'res')
-rw-r--r--res/drawable-v28/round_rect_folder.xml21
-rw-r--r--res/drawable/round_rect_folder.xml21
-rw-r--r--res/layout/folder_application.xml1
-rw-r--r--res/layout/user_folder_icon_normalized.xml2
-rw-r--r--res/values/attrs.xml4
-rw-r--r--res/values/styles.xml24
6 files changed, 70 insertions, 3 deletions
diff --git a/res/drawable-v28/round_rect_folder.xml b/res/drawable-v28/round_rect_folder.xml
new file mode 100644
index 000000000..0403be09b
--- /dev/null
+++ b/res/drawable-v28/round_rect_folder.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2019 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"
+ android:shape="rectangle">
+ <solid android:color="?attr/folderFillColor" />
+ <corners android:radius="?android:attr/dialogCornerRadius" />
+</shape>
diff --git a/res/drawable/round_rect_folder.xml b/res/drawable/round_rect_folder.xml
new file mode 100644
index 000000000..8b3d06ca9
--- /dev/null
+++ b/res/drawable/round_rect_folder.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2019 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"
+ android:shape="rectangle">
+ <solid android:color="?attr/folderFillColor" />
+ <corners android:radius="@dimen/bg_round_rect_radius" />
+</shape>
diff --git a/res/layout/folder_application.xml b/res/layout/folder_application.xml
index de861a0ad..c156e113f 100644
--- a/res/layout/folder_application.xml
+++ b/res/layout/folder_application.xml
@@ -18,5 +18,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto"
style="@style/BaseIcon"
+ android:textColor="?attr/folderTextColor"
android:includeFontPadding="false"
launcher:iconDisplay="folder" />
diff --git a/res/layout/user_folder_icon_normalized.xml b/res/layout/user_folder_icon_normalized.xml
index 2e6ce946f..835fee2d3 100644
--- a/res/layout/user_folder_icon_normalized.xml
+++ b/res/layout/user_folder_icon_normalized.xml
@@ -18,7 +18,7 @@
xmlns:launcher="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:background="@drawable/round_rect_primary"
+ android:background="@drawable/round_rect_folder"
android:elevation="5dp"
android:orientation="vertical" >
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 43194d5cb..69b8c8a22 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -36,8 +36,10 @@
<attr name="loadingIconColor" format="color" />
<attr name="folderDotColor" format="color" />
+ <attr name="folderFillColor" format="color" />
<attr name="folderIconRadius" format="float" />
<attr name="folderIconBorderColor" format="color" />
+ <attr name="folderTextColor" format="color" />
<!-- BubbleTextView specific attributes. -->
<declare-styleable name="BubbleTextView">
@@ -55,7 +57,7 @@
<!-- BubbleTextView specific attributes. -->
<declare-styleable name="FolderIconPreview">
- <attr name="android:colorPrimary" />
+ <attr name="folderFillColor" />
<attr name="folderIconBorderColor" />
<attr name="folderDotColor" />
</declare-styleable>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 7932c6d60..8116e30ef 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -26,6 +26,7 @@
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowShowWallpaper">true</item>
+ <item name="folderTextColor">?attr/workspaceTextColor</item>
</style>
<style name="LauncherTheme" parent="@style/BaseLauncherTheme">
@@ -44,7 +45,9 @@
<item name="workspaceStatusBarScrim">@drawable/workspace_bg</item>
<item name="widgetsTheme">@style/WidgetContainerTheme</item>
<item name="folderDotColor">?android:attr/colorPrimary</item>
+ <item name="folderFillColor">#CDFFFFFF</item>
<item name="folderIconBorderColor">?android:attr/colorPrimary</item>
+ <item name="folderTextColor">#FF212121</item>
<item name="loadingIconColor">#CCFFFFFF</item>
<item name="android:windowTranslucentStatus">false</item>
@@ -54,6 +57,11 @@
<item name="android:navigationBarColor">#00000000</item>
</style>
+ <style name="LauncherTheme.DarkMainColor" parent="@style/LauncherTheme">
+ <item name="folderFillColor">#FF3C4043</item> <!-- 100% GM2 800 -->
+ <item name="folderTextColor">?attr/workspaceTextColor</item>
+ </style>
+
<style name="LauncherTheme.DarkText" parent="@style/LauncherTheme">
<item name="workspaceTextColor">#FF212121</item>
<item name="allAppsInterimScrimAlpha">128</item>
@@ -63,7 +71,9 @@
<item name="isWorkspaceDarkText">true</item>
<item name="workspaceStatusBarScrim">@null</item>
<item name="folderDotColor">#FF464646</item>
+ <item name="folderFillColor">#CDFFFFFF</item>
<item name="folderIconBorderColor">#FF80868B</item>
+ <item name="folderTextColor">?attr/workspaceTextColor</item>
</style>
<style name="LauncherTheme.Dark" parent="@style/LauncherTheme">
@@ -81,13 +91,22 @@
<item name="popupColorTertiary">#757575</item> <!-- Gray 600 -->
<item name="widgetsTheme">@style/WidgetContainerTheme.Dark</item>
<item name="folderDotColor">#FF464646</item>
+ <item name="folderFillColor">#DD3C4043</item> <!-- 87% GM2 800 -->
<item name="folderIconBorderColor">#FF80868B</item>
+ <item name="folderTextColor">@android:color/white</item>
<item name="isMainColorDark">true</item>
<item name="loadingIconColor">#99FFFFFF</item>
</style>
+ <style name="LauncherTheme.Dark.DarkMainColor" parent="@style/LauncherTheme.Dark">
+ <item name="folderFillColor">#FF3C4043</item> <!-- 100% GM2 800 -->
+ <item name="folderTextColor">@android:color/white</item>
+ </style>
+
<style name="LauncherTheme.Dark.DarkText" parent="@style/LauncherTheme.Dark">
<item name="allAppsInterimScrimAlpha">25</item>
+ <item name="folderFillColor">#CDFFFFFF</item>
+ <item name="folderTextColor">?attr/workspaceTextColor</item>
<item name="workspaceTextColor">#FF212121</item>
<item name="workspaceShadowColor">@android:color/transparent</item>
<item name="workspaceAmbientShadowColor">@android:color/transparent</item>
@@ -99,8 +118,11 @@
<!-- A derivative project can extend these themes to customize the application theme without
affecting the base theme -->
<style name="AppTheme" parent="@style/LauncherTheme" />
+ <style name="AppTheme.DarkMainColor" parent="@style/LauncherTheme.DarkMainColor" />
<style name="AppTheme.DarkText" parent="@style/LauncherTheme.DarkText" />
+
<style name="AppTheme.Dark" parent="@style/LauncherTheme.Dark" />
+ <style name="AppTheme.Dark.DarkMainColor" parent="@style/LauncherTheme.Dark.DarkMainColor" />
<style name="AppTheme.Dark.DarkText" parent="@style/LauncherTheme.Dark.DarkText" />
<style name="AppItemActivityTheme" parent="@android:style/Theme.Material.Light.Dialog.Alert">
@@ -157,7 +179,7 @@
<item name="android:shadowRadius">0</item>
</style>
- <!-- Icon displayed on the worksapce -->
+ <!-- Icon displayed on the workspace -->
<style name="BaseIcon.Workspace" >
<item name="android:shadowRadius">2.0</item>
<item name="android:shadowColor">?attr/workspaceShadowColor</item>