diff options
author | lambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-21 04:06:54 +0000 |
---|---|---|
committer | lambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-21 04:06:54 +0000 |
commit | b7742d9d502b1a01f80b38f34b44132bbf266910 (patch) | |
tree | 75d2cafb166c4cf421677ced4217e47e7800b681 /remoting/resources | |
parent | 2a172e455f7060e0786abd37de53a39e21aa5b5e (diff) | |
download | chromium_src-b7742d9d502b1a01f80b38f34b44132bbf266910.zip chromium_src-b7742d9d502b1a01f80b38f34b44132bbf266910.tar.gz chromium_src-b7742d9d502b1a01f80b38f34b44132bbf266910.tar.bz2 |
Implement account switcher as action-bar navigation spinner.
BUG=338773
Review URL: https://codereview.chromium.org/165743002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252493 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/resources')
-rw-r--r-- | remoting/resources/android/layout/account_dropdown.xml | 13 | ||||
-rw-r--r-- | remoting/resources/android/layout/account_selected.xml | 29 | ||||
-rw-r--r-- | remoting/resources/android/menu/chromoting_actionbar.xml | 4 | ||||
-rw-r--r-- | remoting/resources/android/values-land/dimens.xml | 13 | ||||
-rw-r--r-- | remoting/resources/android/values/dimens.xml | 13 | ||||
-rw-r--r-- | remoting/resources/android/values/strings.xml | 1 | ||||
-rw-r--r-- | remoting/resources/android/values/styles.xml | 15 |
7 files changed, 83 insertions, 5 deletions
diff --git a/remoting/resources/android/layout/account_dropdown.xml b/remoting/resources/android/layout/account_dropdown.xml new file mode 100644 index 0000000..a9f0c96 --- /dev/null +++ b/remoting/resources/android/layout/account_dropdown.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- Copyright 2014 The Chromium Authors. All rights reserved. + Use of this source code is governed by a BSD-style license that can be + found in the LICENSE file. +--> + +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:drawablePadding="15sp" + android:padding="15sp" + android:gravity="center_vertical"/> diff --git a/remoting/resources/android/layout/account_selected.xml b/remoting/resources/android/layout/account_selected.xml new file mode 100644 index 0000000..cbf523a --- /dev/null +++ b/remoting/resources/android/layout/account_selected.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- Copyright 2014 The Chromium Authors. All rights reserved. + Use of this source code is governed by a BSD-style license that can be + found in the LICENSE file. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center_vertical|start" + android:orientation="vertical"> + <TextView android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/action_bar_title_top_margin" + android:singleLine="true" + android:ellipsize="end" + android:text="@string/product_name" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textSize="@dimen/action_bar_title_text_size"/> + <TextView android:id="@+id/account_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/action_bar_subtitle_top_margin" + android:singleLine="true" + android:ellipsize="end" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textSize="@dimen/action_bar_subtitle_text_size"/> +</LinearLayout> diff --git a/remoting/resources/android/menu/chromoting_actionbar.xml b/remoting/resources/android/menu/chromoting_actionbar.xml index d22685b..6f057d0 100644 --- a/remoting/resources/android/menu/chromoting_actionbar.xml +++ b/remoting/resources/android/menu/chromoting_actionbar.xml @@ -11,8 +11,4 @@ android:title="@string/actionbar_directoryrefresh" android:icon="@android:drawable/ic_popup_sync" android:showAsAction="ifRoom"/> - <item android:id="@+id/actionbar_accountswitcher" - android:title="@string/actionbar_accountswitcher" - android:icon="@android:drawable/ic_menu_more" - android:showAsAction="ifRoom|withText"/> </menu> diff --git a/remoting/resources/android/values-land/dimens.xml b/remoting/resources/android/values-land/dimens.xml new file mode 100644 index 0000000..ffdc015 --- /dev/null +++ b/remoting/resources/android/values-land/dimens.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- Copyright 2014 The Chromium Authors. All rights reserved. + Use of this source code is governed by a BSD-style license that can be + found in the LICENSE file. +--> + +<resources> + <dimen name="action_bar_title_text_size">16dp</dimen> + <dimen name="action_bar_subtitle_text_size">12dp</dimen> + <dimen name="action_bar_title_top_margin">-4dp</dimen> + <dimen name="action_bar_subtitle_top_margin">-2dp</dimen> +</resources> diff --git a/remoting/resources/android/values/dimens.xml b/remoting/resources/android/values/dimens.xml new file mode 100644 index 0000000..3e7b686 --- /dev/null +++ b/remoting/resources/android/values/dimens.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- Copyright 2014 The Chromium Authors. All rights reserved. + Use of this source code is governed by a BSD-style license that can be + found in the LICENSE file. +--> + +<resources> + <dimen name="action_bar_title_text_size">18dp</dimen> + <dimen name="action_bar_subtitle_text_size">14dp</dimen> + <dimen name="action_bar_title_top_margin">0dp</dimen> + <dimen name="action_bar_subtitle_top_margin">-3dp</dimen> +</resources> diff --git a/remoting/resources/android/values/strings.xml b/remoting/resources/android/values/strings.xml index c51e3cf..6997aae 100644 --- a/remoting/resources/android/values/strings.xml +++ b/remoting/resources/android/values/strings.xml @@ -22,7 +22,6 @@ <!--Action bar buttons--> <string name="actionbar_directoryrefresh">Refresh</string> - <string name="actionbar_accountswitcher">Accounts</string> <string name="actionbar_disconnect">Disconnect</string> <string name="actionbar_hide">Hide</string> <string name="actionbar_keyboard">Keyboard</string> diff --git a/remoting/resources/android/values/styles.xml b/remoting/resources/android/values/styles.xml new file mode 100644 index 0000000..7157205 --- /dev/null +++ b/remoting/resources/android/values/styles.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- Copyright 2014 The Chromium Authors. All rights reserved. + Use of this source code is governed by a BSD-style license that can be + found in the LICENSE file. +--> + +<resources> + <style name="MainTheme" parent="@android:style/Theme.DeviceDefault"> + <item name="android:actionBarStyle">@style/MainActionBar</item> + </style> + <style name="MainActionBar" parent="@android:style/Widget.DeviceDefault.ActionBar"> + <item name="android:displayOptions">showHome</item> + </style> +</resources> |