diff options
author | Andrew Sapperstein <asapperstein@google.com> | 2014-07-27 12:30:18 -0700 |
---|---|---|
committer | Andrew Sapperstein <asapperstein@google.com> | 2014-08-04 23:09:14 -0700 |
commit | 52882ff08fe9420fe2dbb3f681545a330222e9c8 (patch) | |
tree | a580699c2c23ef3e9cdbe00130535786997c66ff /res/layout | |
parent | 53de448d6c67e56df4e3bcefb3e2d84c810e2e89 (diff) | |
download | android_packages_apps_UnifiedEmail-52882ff08fe9420fe2dbb3f681545a330222e9c8.tar.gz android_packages_apps_UnifiedEmail-52882ff08fe9420fe2dbb3f681545a330222e9c8.tar.bz2 android_packages_apps_UnifiedEmail-52882ff08fe9420fe2dbb3f681545a330222e9c8.zip |
switch to appcompat. b/16664350
Currently only for MailActivity, ComposeActivity,
and FolderSelectionActivity.
Any activity that inherits from ActionBarActivity must
use an Appcompat-derived style. Three styles currently
exist: UnifiedEmail.Appcompat, UnifiedEmail.Appcompat.Toolbar,
and ShortcutWidgetTheme are all based on appcompat.
go/appcompat-material-doc contains the full migration guide.
The fast version is:
All MenuItem-related work that relates to actions must use
the MenuItemCompat-equivalent.
Any theming should use the appcompat versions which don't require
a namespace prefix. For instance, use actionBarStyle instead of
android:actionBarStyle.
There are a few missing styles on views that can't use appcompat versions.
Those still use style overrides for v21 changes. All others use appcompat versions.
A few methods on activity should now use the support equivalents:
getSupportActionBar()
supportInvalidateOptionsMenu()
startSupportActionMode()
Change-Id: Ic6f5964f4115ab4bde49c19df5fe49c9086df965
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/mail_actionbar_searchview.xml | 2 | ||||
-rw-r--r-- | res/layout/one_pane_activity.xml | 35 |
2 files changed, 25 insertions, 12 deletions
diff --git a/res/layout/mail_actionbar_searchview.xml b/res/layout/mail_actionbar_searchview.xml index 572adab60..730f1708a 100644 --- a/res/layout/mail_actionbar_searchview.xml +++ b/res/layout/mail_actionbar_searchview.xml @@ -16,7 +16,7 @@ limitations under the License. --> -<android.widget.SearchView +<android.support.v7.widget.SearchView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/search_layout" android:gravity="center_vertical" diff --git a/res/layout/one_pane_activity.xml b/res/layout/one_pane_activity.xml index 9453feaef..4726508d0 100644 --- a/res/layout/one_pane_activity.xml +++ b/res/layout/one_pane_activity.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2012 The Android Open Source Project + Copyright (C) 2014 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. @@ -21,25 +21,38 @@ android:layout_height="match_parent"> <!-- DrawerLayout current only supports one content view (b/8752191) --> - <FrameLayout + <LinearLayout android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:orientation="vertical"> + + <android.support.v7.widget.Toolbar + android:id="@+id/mail_toolbar" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + android:background="?attr/colorPrimary" /> <FrameLayout - android:id="@+id/content_pane" android:layout_width="match_parent" - android:layout_height="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" /> - <include layout="@layout/conversation_pager" /> + <include layout="@layout/floating_actions" /> - <include layout="@layout/floating_actions" /> + </FrameLayout> - </FrameLayout> + </LinearLayout> <!--A drawer for phones: a pull-out that gives the list of folders. --> <include layout="@layout/drawer_fragment" - android:layout_width="@dimen/drawer_width" - android:layout_height="match_parent" - android:layout_gravity="start" /> + android:layout_width="@dimen/drawer_width" + android:layout_height="match_parent" + android:layout_gravity="start" /> </android.support.v4.widget.DrawerLayout> |