Merge "Remove previous code for moving FAB into TL" into ub-gmail-ur14-dev
diff --git a/res/layout/compose.xml b/res/layout/compose.xml
index de76bda..d95b5c6 100644
--- a/res/layout/compose.xml
+++ b/res/layout/compose.xml
@@ -18,7 +18,9 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/holo_light_background_color"
+ android:layout_gravity="center_horizontal"
+ android:paddingLeft="@dimen/compose_wrapper_side_padding"
+ android:paddingRight="@dimen/compose_wrapper_side_padding"
style="@style/ComposeAreaWrapper">
<include layout="@layout/wait_fragment" />
@@ -90,7 +92,6 @@
android:id="@+id/composearea_tap_trap_bottom"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/compose_background_color"
android:clickable="true" />
</LinearLayout>
diff --git a/res/layout/one_pane_activity.xml b/res/layout/one_pane_activity.xml
index ef0464b..6705f55 100644
--- a/res/layout/one_pane_activity.xml
+++ b/res/layout/one_pane_activity.xml
@@ -18,7 +18,8 @@
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_container"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:fitsSystemWindows="true">
<!-- DrawerLayout current only supports one content view (b/8752191) -->
<LinearLayout
diff --git a/res/layout/toolbar_with_search.xml b/res/layout/toolbar_with_search.xml
index 9cc0ca7..83108d5 100644
--- a/res/layout/toolbar_with_search.xml
+++ b/res/layout/toolbar_with_search.xml
@@ -20,7 +20,8 @@
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
- android:elevation="8dp" >
+ android:elevation="8dp"
+ android:touchscreenBlocksFocus="true">
<include layout="@layout/mail_toolbar_view" />
diff --git a/res/values-sw600dp/colors.xml b/res/values-sw600dp/colors.xml
index 1fe2717..85bc9a9 100644
--- a/res/values-sw600dp/colors.xml
+++ b/res/values-sw600dp/colors.xml
@@ -2,4 +2,5 @@
<resources>
<color name="folder_list_divider_color">#b2b2b2</color>
<color name="drawer_item_selected_background_color">#e4e4e4</color>
+ <color name="mail_activity_status_bar_color">@color/primary_dark_color</color>
</resources>
diff --git a/res/values-sw600dp/styles.xml b/res/values-sw600dp/styles.xml
index 3c86c8a..6242d35 100644
--- a/res/values-sw600dp/styles.xml
+++ b/res/values-sw600dp/styles.xml
@@ -25,4 +25,8 @@
<item name="android:layout_width">@dimen/vacation_responder_width</item>
<item name="android:layout_height">match_parent</item>
</style>
+
+ <style name="ComposeAreaWrapper">
+ <item name="android:background">@color/holo_light_background_color</item>
+ </style>
</resources>
diff --git a/res/values-v21/themes.xml b/res/values-v21/themes.xml
index f45dd63..b8c446f 100644
--- a/res/values-v21/themes.xml
+++ b/res/values-v21/themes.xml
@@ -7,7 +7,7 @@
<!-- ActionBar color -->
<item name="android:colorPrimary">@color/actionbar_color</item>
<!-- Used by the StatusBar and NavBar (currently broken?) -->
- <item name="android:colorPrimaryDark">@color/statusbar_color</item>
+ <item name="android:colorPrimaryDark">@color/primary_dark_color</item>
<item name="android:colorAccent">@color/accent_blue</item>
</style>
</resources>
\ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 462fa2c..1c32c7c 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -62,8 +62,6 @@
<color name="compose_user_text">@color/text_color_black</color>
<color name="compose_label_hint">@color/text_color_hint_grey</color>
<color name="compose_divider_color">@color/light_gray</color>
- <!-- Must match the quoted_text_background_color_string -->
- <color name="compose_background_color">@android:color/white</color>
<string name="quoted_text_font_color_string" translatable="false">@color/text_color_grey</string>
<color name="conv_header_add_label_text">@android:color/black</color>
@@ -167,7 +165,8 @@
<color name="statusbar_orange">#d06d0c</color>
<color name="actionbar_color">@color/mail_orange</color>
- <color name="statusbar_color">@color/statusbar_orange</color>
+ <color name="primary_dark_color">@color/statusbar_orange</color>
+ <color name="mail_activity_status_bar_color">#00000000</color>
<color name="action_mode_background">@color/text_color_grey</color>
<color name="action_mode_statusbar_color">#616161</color>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 0c9e109..12a0d18 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -138,11 +138,7 @@
<style name="ComposeArea" parent="AbstractComposeAreaWithRtl" />
- <style name="ComposeAreaWrapper">
- <item name="android:layout_gravity">center_horizontal</item>
- <item name="android:paddingLeft">@dimen/compose_wrapper_side_padding</item>
- <item name="android:paddingRight">@dimen/compose_wrapper_side_padding</item>
- </style>
+ <style name="ComposeAreaWrapper" />
<style name="ComposeAttachmentTileTextEndStyle">
<item name="android:paddingRight">@dimen/compose_attachment_tile_text_end_padding</item>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index a48e407..325745f 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<resources>
+<resources xmlns:tools="http://schemas.android.com/tools">
<style name="UnifiedEmailTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/ActionBarStyle</item>
<item name="android:actionBarWidgetTheme">@style/ActionBarWidgetTheme</item>
@@ -21,7 +21,7 @@
<item name="actionOverflowButtonStyle">@style/ActionBarOverflowButtonStyle.Appcompat</item>
<item name="colorPrimary">@color/actionbar_color</item>
<!-- Used by the StatusBar and NavBar (currently broken?) -->
- <item name="colorPrimaryDark">@color/statusbar_color</item>
+ <item name="colorPrimaryDark">@color/primary_dark_color</item>
<item name="colorAccent">@color/accent_blue</item>
<item name="homeAsUpIndicator">@drawable/ic_arrow_back_wht_24dp</item>
</style>
@@ -31,10 +31,14 @@
<item name="actionOverflowButtonStyle">@style/ActionBarOverflowButtonStyle.Appcompat</item>
<item name="colorPrimary">@color/actionbar_color</item>
<!-- Used by the StatusBar and NavBar (currently broken?) -->
- <item name="colorPrimaryDark">@color/statusbar_color</item>
+ <item name="colorPrimaryDark">@color/primary_dark_color</item>
<item name="colorAccent">@color/accent_blue</item>
<item name="homeAsUpIndicator">@drawable/ic_arrow_back_wht_24dp</item>
<item name="windowActionModeOverlay">true</item>
+ <!-- Tell SystemUI that our activity window will draw the background for the status bar. -->
+ <item name="android:windowDrawsSystemBarBackgrounds" tools:ignore="NewApi">true</item>
+ <!-- Set the status bar to fully transparent. We’ll draw it ourselves since we want to draw other content over it. -->
+ <item name="android:statusBarColor">@color/mail_activity_status_bar_color</item>
</style>
<style name="MailActivityTheme" parent="@style/UnifiedEmailTheme.Appcompat.Toolbar" />
diff --git a/src/com/android/mail/compose/ComposeActivity.java b/src/com/android/mail/compose/ComposeActivity.java
index ef0355d..20f2b95 100644
--- a/src/com/android/mail/compose/ComposeActivity.java
+++ b/src/com/android/mail/compose/ComposeActivity.java
@@ -3999,7 +3999,7 @@
final Window window = getWindow();
if (window != null) {
window.setStatusBarColor(
- getResources().getColor(R.color.statusbar_color));
+ getResources().getColor(R.color.primary_dark_color));
}
}
}
diff --git a/src/com/android/mail/ui/FolderListFragment.java b/src/com/android/mail/ui/FolderListFragment.java
index 590e5ec..2d6a6ef 100644
--- a/src/com/android/mail/ui/FolderListFragment.java
+++ b/src/com/android/mail/ui/FolderListFragment.java
@@ -458,7 +458,7 @@
mListView = (ListView) rootView.findViewById(android.R.id.list);
mListView.setEmptyView(null);
mListView.setDivider(null);
- addListHeader(inflater, mListView);
+ addListHeader(inflater, rootView, mListView);
if (savedState != null && savedState.containsKey(BUNDLE_LIST_STATE)) {
mListView.onRestoreInstanceState(savedState.getParcelable(BUNDLE_LIST_STATE));
}
@@ -482,7 +482,7 @@
return rootView;
}
- protected void addListHeader(LayoutInflater inflater, ListView list) {
+ protected void addListHeader(LayoutInflater inflater, View rootView, ListView list) {
// Default impl does nothing
}
diff --git a/src/com/android/mail/ui/MailActivity.java b/src/com/android/mail/ui/MailActivity.java
index 1251e8b..235841c 100644
--- a/src/com/android/mail/ui/MailActivity.java
+++ b/src/com/android/mail/ui/MailActivity.java
@@ -181,6 +181,7 @@
customViewToolbar.setController(this, mController, mViewMode);
mController.addConversationListLayoutListener(customViewToolbar);
}
+
setSupportActionBar(toolbar);
toolbar.setNavigationOnClickListener(mController.getNavigationViewClickListener());
@@ -513,7 +514,7 @@
final Window window = getWindow();
if (window != null) {
window.setStatusBarColor(
- getResources().getColor(R.color.statusbar_color));
+ getResources().getColor(R.color.mail_activity_status_bar_color));
}
}
}
diff --git a/src/com/android/mail/ui/OnePaneController.java b/src/com/android/mail/ui/OnePaneController.java
index 875bb5a..5d87b35 100644
--- a/src/com/android/mail/ui/OnePaneController.java
+++ b/src/com/android/mail/ui/OnePaneController.java
@@ -138,6 +138,7 @@
mDrawerContainer = (DrawerLayout) mActivity.findViewById(R.id.drawer_container);
mDrawerContainer.setDrawerTitle(Gravity.START,
mActivity.getActivityContext().getString(R.string.drawer_title));
+ mDrawerContainer.setStatusBarBackground(R.color.primary_dark_color);
final String drawerPulloutTag = mActivity.getString(R.string.drawer_pullout_tag);
mDrawerPullout = mDrawerContainer.findViewWithTag(drawerPulloutTag);
mDrawerPullout.setBackgroundResource(R.color.list_background_color);