summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblunden <blunden2@gmail.com>2014-11-22 21:24:43 +0100
committerGerrit Code Review <gerrit@cyanogenmod.org>2014-11-24 06:57:18 +0000
commit35f853bf362f3a76412b85fc0db33a16d2d163e8 (patch)
treef375380fa33466f693abc0be132c1f74a2b09442
parent6a9275b2c29c01186d5af08051e93a9a1937e414 (diff)
downloadandroid_packages_apps_UnifiedEmail-35f853bf362f3a76412b85fc0db33a16d2d163e8.tar.gz
android_packages_apps_UnifiedEmail-35f853bf362f3a76412b85fc0db33a16d2d163e8.tar.bz2
android_packages_apps_UnifiedEmail-35f853bf362f3a76412b85fc0db33a16d2d163e8.zip
Fix the color of the Compose FAB
Also render it with mostly vector drawables Change-Id: Ib19c0b4093a7c581481f7cab3c8b92fcf84f5b13
-rw-r--r--res/drawable-hdpi/ic_compose_56dp.pngbin6365 -> 0 bytes
-rw-r--r--res/drawable-hdpi/ic_compose_pressed_56dp.pngbin6323 -> 0 bytes
-rw-r--r--res/drawable-mdpi/ic_compose_56dp.pngbin4964 -> 0 bytes
-rw-r--r--res/drawable-mdpi/ic_compose_pressed_56dp.pngbin4889 -> 0 bytes
-rw-r--r--res/drawable-xhdpi/ic_compose_56dp.pngbin7645 -> 0 bytes
-rw-r--r--res/drawable-xhdpi/ic_compose_pressed_56dp.pngbin7631 -> 0 bytes
-rw-r--r--res/drawable-xxhdpi/ic_compose_56dp.pngbin10383 -> 0 bytes
-rw-r--r--res/drawable-xxhdpi/ic_compose_pressed_56dp.pngbin10281 -> 0 bytes
-rw-r--r--res/drawable/compose_button.xml35
-rw-r--r--res/drawable/compose_button_background.xml6
-rw-r--r--res/drawable/compose_button_pressed_background.xml6
-rw-r--r--res/values/colors.xml5
-rw-r--r--res/values/dimen.xml5
13 files changed, 35 insertions, 22 deletions
diff --git a/res/drawable-hdpi/ic_compose_56dp.png b/res/drawable-hdpi/ic_compose_56dp.png
deleted file mode 100644
index 75dd9b23f..000000000
--- a/res/drawable-hdpi/ic_compose_56dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_compose_pressed_56dp.png b/res/drawable-hdpi/ic_compose_pressed_56dp.png
deleted file mode 100644
index e058e658e..000000000
--- a/res/drawable-hdpi/ic_compose_pressed_56dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_compose_56dp.png b/res/drawable-mdpi/ic_compose_56dp.png
deleted file mode 100644
index 98f2c918f..000000000
--- a/res/drawable-mdpi/ic_compose_56dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_compose_pressed_56dp.png b/res/drawable-mdpi/ic_compose_pressed_56dp.png
deleted file mode 100644
index 0ccc5051f..000000000
--- a/res/drawable-mdpi/ic_compose_pressed_56dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_compose_56dp.png b/res/drawable-xhdpi/ic_compose_56dp.png
deleted file mode 100644
index e1179193d..000000000
--- a/res/drawable-xhdpi/ic_compose_56dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_compose_pressed_56dp.png b/res/drawable-xhdpi/ic_compose_pressed_56dp.png
deleted file mode 100644
index a93ecdc81..000000000
--- a/res/drawable-xhdpi/ic_compose_pressed_56dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_compose_56dp.png b/res/drawable-xxhdpi/ic_compose_56dp.png
deleted file mode 100644
index 3b0b5fb35..000000000
--- a/res/drawable-xxhdpi/ic_compose_56dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_compose_pressed_56dp.png b/res/drawable-xxhdpi/ic_compose_pressed_56dp.png
deleted file mode 100644
index 55655ef4b..000000000
--- a/res/drawable-xxhdpi/ic_compose_pressed_56dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/compose_button.xml b/res/drawable/compose_button.xml
index a550835ca..0496cfbe9 100644
--- a/res/drawable/compose_button.xml
+++ b/res/drawable/compose_button.xml
@@ -1,23 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014 Google Inc.
- Licensed to 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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true" android:drawable="@drawable/ic_compose_pressed_56dp" />
- <item android:state_focused="true" android:drawable="@drawable/ic_compose_pressed_56dp" />
- <item android:drawable="@drawable/ic_compose_56dp" />
-</selector>
+<layer-list
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <selector>
+ <item android:state_pressed="true" android:drawable="@drawable/compose_button_pressed_background" />
+ <item android:state_focused="true" android:drawable="@drawable/compose_button_pressed_background" />
+ <item android:drawable="@drawable/compose_button_background" />
+ </selector>
+ </item>
+ <item>
+ <bitmap android:gravity="center" android:src="@drawable/ic_widget_compose_wht_24dp" />
+ </item>
+</layer-list> \ No newline at end of file
diff --git a/res/drawable/compose_button_background.xml b/res/drawable/compose_button_background.xml
new file mode 100644
index 000000000..91692fbaa
--- /dev/null
+++ b/res/drawable/compose_button_background.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape android:shape="oval"
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <solid android:color="@color/compose_button_background_color" />
+ <size android:height="@dimen/compose_button_width" android:width="@dimen/compose_button_width" />
+</shape> \ No newline at end of file
diff --git a/res/drawable/compose_button_pressed_background.xml b/res/drawable/compose_button_pressed_background.xml
new file mode 100644
index 000000000..a7120ddf7
--- /dev/null
+++ b/res/drawable/compose_button_pressed_background.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape android:shape="oval"
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <solid android:color="@color/compose_button_pressed_background_color" />
+ <size android:height="@dimen/compose_button_width" android:width="@dimen/compose_button_width" />
+</shape> \ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 9f486b3ef..bf801b138 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -169,6 +169,11 @@
<color name="actionbar_color">@color/mail_orange</color>
<color name="statusbar_color">@color/statusbar_orange</color>
+
+ <color name="compose_button_background_color">@color/mail_orange</color>
+ <color name="compose_button_pressed_background_color">@color/statusbar_orange</color>
+ <color name="compose_button_tint">#20444444</color>
+
<!-- TODO: get real color from UX -->
<color name="action_mode_background">#9b9b9b</color>
diff --git a/res/values/dimen.xml b/res/values/dimen.xml
index 86c808ebb..b50c095c2 100644
--- a/res/values/dimen.xml
+++ b/res/values/dimen.xml
@@ -78,6 +78,11 @@
<dimen name="message_header_inner_side_padding">16dp</dimen>
<dimen name="attachment_toast_yoffset">-100dip</dimen>
<dimen name="floating_action_bar_margin">16dp</dimen>
+ <dimen name="compose_button_width">56.0dip</dimen>
+ <dimen name="compose_button_margin_bottom">3.0dip</dimen>
+ <dimen name="compose_button_margin_side">6.0dip</dimen>
+ <dimen name="compose_button_padding_bottom">5.0dip</dimen>
+ <dimen name="compose_button_elevation">8.0dip</dimen>
<dimen name="snack_bar_margin_horizontal">24dp</dimen>
<dimen name="snack_bar_margin_vertical">14dp</dimen>
<dimen name="folder_selection_margin_start">16dp</dimen>