Merge "Move scrollbar right with custom scroll bar resources." into lmp-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index c428e98..1abfd22 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -220,6 +220,7 @@
 
         <activity
             android:name=".activities.ShowOrCreateActivity"
+            android:label="@string/launcherActivityLabel"
             android:theme="@android:style/Theme.Translucent.NoTitleBar">
 
             <intent-filter>
@@ -243,6 +244,7 @@
 
         <activity
             android:name=".quickcontact.QuickContactActivity"
+            android:label="@string/launcherActivityLabel"
             android:theme="@style/Theme.QuickContact"
             android:launchMode="singleTop"
             android:excludeFromRecents="true"
@@ -327,6 +329,7 @@
         <!-- Create a new or edit an existing contact -->
         <activity
             android:name=".activities.ContactEditorActivity"
+            android:label="@string/launcherActivityLabel"
             android:theme="@style/EditorActivityTheme"
             android:windowSoftInputMode="stateHidden|adjustResize">
 
diff --git a/res/layout-sw720dp/quickcontact_activity.xml b/res/layout-sw720dp/quickcontact_activity.xml
index 5a7d90a..efbb4d1 100644
--- a/res/layout-sw720dp/quickcontact_activity.xml
+++ b/res/layout-sw720dp/quickcontact_activity.xml
@@ -27,52 +27,45 @@
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:orientation="vertical" >
+        android:orientation="horizontal">
 
         <View
-            android:layout_width="match_parent"
-            android:layout_height="@dimen/quickcontact_starting_empty_height"
-            android:contentDescription="@string/quickcontact_transparent_view_description"
-            android:id="@+id/transparent_view" />
+            android:id="@+id/empty_start_column"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="@integer/contact_list_space_layout_weight"
+            android:contentDescription="@string/quickcontact_transparent_view_description" />
 
         <LinearLayout
-            android:layout_width="match_parent"
+            android:layout_width="0dp"
+            android:layout_weight="@integer/contact_list_card_layout_weight"
             android:layout_height="match_parent"
-            android:orientation="horizontal">
+            android:orientation="vertical">
 
             <View
-                android:id="@+id/empty_start_column"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="@integer/contact_list_space_layout_weight"
-                android:background="@color/background_primary"
-                android:focusable="false" />
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/quickcontact_starting_empty_height"
+                android:contentDescription="@string/quickcontact_transparent_view_description"
+                android:id="@+id/transparent_view" />
 
-            <LinearLayout
-                android:layout_width="0dp"
+            <FrameLayout
+                android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:layout_weight="@integer/contact_list_card_layout_weight"
-                android:orientation="vertical"
-                android:elevation="@dimen/contact_list_card_elevation"
-                android:outlineProvider="bounds" >
-                <FrameLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:id="@+id/toolbar_parent">
-                    <include layout="@layout/quickcontact_header" />
-                </FrameLayout>
+                android:id="@+id/toolbar_parent">
+                <include layout="@layout/quickcontact_header" />
+            </FrameLayout>
 
-                <include layout="@layout/quickcontact_content" />
-            </LinearLayout>
+            <include layout="@layout/quickcontact_content" />
 
-            <View
-                android:id="@+id/empty_end_column"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="@integer/contact_list_space_layout_weight"
-                android:background="@color/background_primary"
-                android:focusable="false" />
         </LinearLayout>
+
+        <View
+            android:id="@+id/empty_end_column"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="@integer/contact_list_space_layout_weight"
+            android:contentDescription="@string/quickcontact_transparent_view_description" />
+
     </LinearLayout>
 
     <!-- This title's maximum height must be less than the minimum size of its
diff --git a/res/values-sw600dp/styles.xml b/res/values-sw600dp/styles.xml
index 17b1f69..d92d3c7 100644
--- a/res/values-sw600dp/styles.xml
+++ b/res/values-sw600dp/styles.xml
@@ -30,11 +30,6 @@
         <item name="android:background">@android:color/transparent</item>
     </style>
 
-    <style name="NonPhoneDialogTheme" parent="@android:Theme.Material.Light.Dialog">
-        <item name="android:windowBackground">@android:color/transparent</item>
-        <item name="android:windowContentOverlay">@null</item>
-    </style>
-
     <style name="ConfirmAddDetailViewStyle">
         <item name="android:layout_width">match_parent</item>
         <item name="android:layout_height">wrap_content</item>
diff --git a/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java b/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java
index 1313e24..f40ebe7 100644
--- a/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java
+++ b/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java
@@ -728,7 +728,6 @@
     private void updateBadges() {
         if (mIsExpanded) {
             mBadgeContainer.removeAllViews();
-            mBadgeIds.clear();
         } else {
             // Inflate badges if not yet created
             if (mBadges.size() < mEntries.size() - mCollapsedEntriesCount) {
@@ -829,6 +828,8 @@
         transitionSet.addTransition(boundsTransition);
         transitionSet.addTransition(scrollTransition);
 
+        transitionSet.excludeTarget(R.id.text, /* exclude = */ true);
+
         final ViewGroup transitionViewContainer = mAnimationViewGroup == null ?
                 this : mAnimationViewGroup;
 
diff --git a/src/com/android/contacts/widget/MultiShrinkScroller.java b/src/com/android/contacts/widget/MultiShrinkScroller.java
index 15dca5c..570a24b 100644
--- a/src/com/android/contacts/widget/MultiShrinkScroller.java
+++ b/src/com/android/contacts/widget/MultiShrinkScroller.java
@@ -275,7 +275,21 @@
         mLargeTextView = (TextView) findViewById(R.id.large_title);
         mInvisiblePlaceholderTextView = (TextView) findViewById(R.id.placeholder_textview);
         mStartColumn = findViewById(R.id.empty_start_column);
-
+        // Touching the empty space should close the card
+        if (mStartColumn != null) {
+            mStartColumn.setOnClickListener(new OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    scrollOffBottom();
+                }
+            });
+            findViewById(R.id.empty_end_column).setOnClickListener(new OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    scrollOffBottom();
+                }
+            });
+        }
         mListener = listener;
         mIsOpenContactSquare = isOpenContactSquare;