fix 1-pane drawer overdraw
Ensure DrawerLayout only has one content view (or else it will double-
draw scrims).
Ensure the drawer itself has an opaque background to enable faster
clipping codepath in DrawerLayout.drawChild(). It must be the drawer
itself and not a child that has a background.
Bug: 8753305
Change-Id: Ib3fd18fe5e6fda5738adc4fd12ea6b09034e78ca
diff --git a/res/layout/one_pane_activity.xml b/res/layout/one_pane_activity.xml
index 901f6e4..b236819 100644
--- a/res/layout/one_pane_activity.xml
+++ b/res/layout/one_pane_activity.xml
@@ -20,17 +20,18 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <FrameLayout
- android:id="@+id/content_pane"
- android:layout_width="match_parent"
- android:layout_height="match_parent" />
-
- <include layout="@layout/conversation_pager" />
-
+ <!-- DrawerLayout current only supports one content view (b/8752191) -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
+ <FrameLayout
+ android:id="@+id/content_pane"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <include layout="@layout/conversation_pager" />
+
<com.android.mail.ui.ActionableToastBar
android:id="@+id/toast_bar"
style="@style/ToastBarStyle" />
diff --git a/src/com/android/mail/ui/FolderListFragment.java b/src/com/android/mail/ui/FolderListFragment.java
index cdba655..78ed75d 100644
--- a/src/com/android/mail/ui/FolderListFragment.java
+++ b/src/com/android/mail/ui/FolderListFragment.java
@@ -372,10 +372,6 @@
mListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
mListView.setEmptyView(null);
mListView.setDivider(null);
- // If we're not using tablet UI, set the background correctly
- if (!Utils.useTabletUI(getResources())) {
- mListView.setBackgroundResource(R.color.list_background_color);
- }
if (savedState != null && savedState.containsKey(BUNDLE_LIST_STATE)) {
mListView.onRestoreInstanceState(savedState.getParcelable(BUNDLE_LIST_STATE));
}
diff --git a/src/com/android/mail/ui/OnePaneController.java b/src/com/android/mail/ui/OnePaneController.java
index 92b45d9..9508449 100644
--- a/src/com/android/mail/ui/OnePaneController.java
+++ b/src/com/android/mail/ui/OnePaneController.java
@@ -225,7 +225,7 @@
mDrawerPullout = (ViewGroup) mDrawerContainer.findViewById(R.id.drawer_pullout);
mDrawerContainer.setDrawerShadow(
mContext.getResources().getDrawable(R.drawable.drawer_shadow), Gravity.LEFT);
-
+ mDrawerPullout.setBackgroundResource(R.color.list_background_color);
mDrawerToggle = new ActionBarDrawerToggle((Activity)mActivity, mDrawerContainer,
R.drawable.ic_drawer, R.string.drawer_open, R.string.drawer_close);