From 256423f10b4fd85a4233146ceb4e063db806b500 Mon Sep 17 00:00:00 2001 From: Nicolas Prevot Date: Tue, 9 Feb 2016 16:33:57 +0000 Subject: [PATCH] Update cross-profile intent resolver. Move the profile button one line above. Change "Work" to "Switch to Work" Change "Personal" to "Switch to Personal" BUG:25609998 Change-Id: I002c8e3cc1537b1b9b8b52b79ba639ab5b8e5f88 --- .../internal/app/ResolverActivity.java | 7 +-- core/res/res/layout/chooser_grid.xml | 63 +++++++------------ core/res/res/layout/resolver_list.xml | 55 ++++++---------- core/res/res/values/strings.xml | 8 +-- 4 files changed, 48 insertions(+), 85 deletions(-) diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java index 80e1db0527a53..a4bb1fd64b77a 100644 --- a/core/java/com/android/internal/app/ResolverActivity.java +++ b/core/java/com/android/internal/app/ResolverActivity.java @@ -392,12 +392,7 @@ public class ResolverActivity extends Activity { final DisplayResolveInfo dri = mAdapter.getOtherProfile(); if (dri != null) { mProfileView.setVisibility(View.VISIBLE); - final ImageView icon = (ImageView) mProfileView.findViewById(R.id.icon); - final TextView text = (TextView) mProfileView.findViewById(R.id.text1); - if (!dri.hasDisplayIcon()) { - new LoadIconIntoViewTask(dri, icon).execute(); - } - icon.setImageDrawable(dri.getDisplayIcon()); + final TextView text = (TextView) mProfileView.findViewById(R.id.profile_button); text.setText(dri.getDisplayLabel()); } else { mProfileView.setVisibility(View.GONE); diff --git a/core/res/res/layout/chooser_grid.xml b/core/res/res/layout/chooser_grid.xml index 41726fb71f7f2..d12c8ba2f2efb 100644 --- a/core/res/res/layout/chooser_grid.xml +++ b/core/res/res/layout/chooser_grid.xml @@ -25,63 +25,48 @@ android:maxCollapsedHeightSmall="56dp" android:id="@id/contentPanel"> - + + android:scaleType="fitCenter" + android:layout_below="@id/profile_button" + android:layout_alignParentLeft="true" + /> - - - - - + android:paddingBottom="12dp" + android:layout_below="@id/profile_button" + android:layout_toRightOf="@id/title_icon"/> + - + - - - - - + Android System - - Personal + + Switch to Personal - - Work + + Switch to Work Contacts