Contact card fixes
- Move call to TabScrollManager until tab carousel is initialized
(this will allow contact with social updates to scroll + pin header)
- Bring back overlay / touch interceptor on phone landscape
so updates fragment will be dimmed out when it's not the current page
- Remove windowContentOverlay=null on contact detail activity
so the shadow appears below action bar
Bug: 5144095
Change-Id: I206e83906b89c5de0d8860e1bfc89c31b4f638b7
diff --git a/res/layout-w470dp/contact_detail_fragment.xml b/res/layout-w470dp/contact_detail_fragment.xml
index 56c9f20..d63236d 100644
--- a/res/layout-w470dp/contact_detail_fragment.xml
+++ b/res/layout-w470dp/contact_detail_fragment.xml
@@ -77,7 +77,6 @@
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="@android:color/black"
- android:alpha=".50"
android:visibility="gone"/>
<View
diff --git a/res/layout-w470dp/contact_detail_updates_fragment.xml b/res/layout-w470dp/contact_detail_updates_fragment.xml
index 92ddd8c..dd7cfbd 100644
--- a/res/layout-w470dp/contact_detail_updates_fragment.xml
+++ b/res/layout-w470dp/contact_detail_updates_fragment.xml
@@ -14,21 +14,45 @@
limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
android:id="@+id/contact_detail_updates_fragment"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
+ android:layout_height="match_parent">
- <include
- android:id="@+id/title"
- layout="@layout/contact_detail_kind_title_entry_view" />
-
- <ListView android:id="@android:id/list"
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@color/background_social_updates"
- android:divider="@null"/>
+ android:layout_height="match_parent"
+ android:orientation="vertical">
-</LinearLayout>
+ <include
+ android:id="@+id/title"
+ layout="@layout/contact_detail_kind_title_entry_view" />
+
+ <ListView android:id="@android:id/list"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/background_social_updates"
+ android:divider="@null"/>
+
+ </LinearLayout>
+
+ <View
+ android:id="@+id/alpha_overlay"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentTop="true"
+ android:background="@android:color/black"
+ android:visibility="gone"/>
+
+ <View
+ android:id="@+id/touch_intercept_overlay"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentTop="true"
+ android:background="?android:attr/selectableItemBackground"
+ android:visibility="gone"/>
+
+</FrameLayout>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index a137361..763a600 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -76,7 +76,6 @@
<style name="ContactDetailActivityTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
- <item name="android:windowContentOverlay">@null</item>
<item name="android:textColorPrimary">@color/primary_text_color</item>
<item name="android:textColorSecondary">@color/secondary_text_color</item>
</style>
diff --git a/src/com/android/contacts/activities/ContactDetailActivity.java b/src/com/android/contacts/activities/ContactDetailActivity.java
index 3cd07ca..c863b23 100644
--- a/src/com/android/contacts/activities/ContactDetailActivity.java
+++ b/src/com/android/contacts/activities/ContactDetailActivity.java
@@ -152,7 +152,6 @@
}
mDetailFragment.setListener(mFragmentListener);
- TabCarouselScrollManager.bind(mTabCarousel, mDetailFragment, mUpdatesFragment);
mDetailFragment.setData(mLookupUri, mContactData);
mUpdatesFragment.setData(mLookupUri, mContactData);
@@ -348,6 +347,7 @@
mTabCarousel = (ContactDetailTabCarousel) findViewById(R.id.tab_carousel);
if (mTabCarousel != null) {
mTabCarousel.setListener(mTabCarouselListener);
+ TabCarouselScrollManager.bind(mTabCarousel, mDetailFragment, mUpdatesFragment);
}
mViewPager = (ViewPager) findViewById(R.id.pager);