summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/layout/carousel_about_tab.xml66
-rw-r--r--res/layout/carousel_updates_tab.xml66
-rw-r--r--res/layout/contact_detail_activity.xml21
-rw-r--r--res/layout/contact_detail_tab_carousel.xml39
-rw-r--r--res/layout/contact_detail_updates_fragment.xml33
-rw-r--r--res/layout/simple_contact_detail_header_view_list_item.xml43
-rw-r--r--res/values/colors.xml3
-rw-r--r--res/values/dimens.xml15
-rw-r--r--res/values/strings.xml6
9 files changed, 285 insertions, 7 deletions
diff --git a/res/layout/carousel_about_tab.xml b/res/layout/carousel_about_tab.xml
new file mode 100644
index 000000000..f1ed4f1b3
--- /dev/null
+++ b/res/layout/carousel_about_tab.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="@dimen/detail_tab_carousel_tab_width"
+ android:layout_height="@dimen/detail_tab_carousel_height"
+ android:background="@color/detail_tab_background">
+
+ <ImageView android:id="@+id/photo"
+ android:scaleType="centerCrop"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"/>
+
+ <!-- Transparent view to overlay on the contact's photo
+ (to allow white text to appear over a white photo). -->
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/detail_tab_carousel_tab_label_height"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentBottom="true"
+ android:background="@android:color/black"
+ android:alpha=".25"/>
+
+ <TextView
+ android:id="@+id/label"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/detail_tab_carousel_tab_label_height"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentBottom="true"
+ android:paddingLeft="@dimen/detail_item_side_margin"
+ android:singleLine="true"
+ android:gravity="left|center_vertical"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textColor="@color/detail_header_view_text_color"
+ style="@android:style/Widget.Holo.ActionBar.TabView" />
+
+ <CheckBox
+ android:id="@+id/star"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10dip"
+ android:layout_marginRight="10dip"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentRight="true"
+ android:layout_gravity="center_vertical"
+ android:contentDescription="@string/description_star"
+ android:visibility="invisible"
+ style="?android:attr/starStyle"/>
+
+</RelativeLayout> \ No newline at end of file
diff --git a/res/layout/carousel_updates_tab.xml b/res/layout/carousel_updates_tab.xml
new file mode 100644
index 000000000..9deb2f7ce
--- /dev/null
+++ b/res/layout/carousel_updates_tab.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="@dimen/detail_tab_carousel_tab_width"
+ android:layout_height="@dimen/detail_tab_carousel_height"
+ android:background="@color/detail_tab_background">
+
+ <!-- Transparent view to overlay on the contact's photo
+ (to allow white text to appear over a white photo). -->
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/detail_tab_carousel_tab_label_height"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentBottom="true"
+ android:background="@android:color/black"
+ android:alpha=".25"/>
+
+ <TextView
+ android:id="@+id/label"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/detail_tab_carousel_tab_label_height"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentBottom="true"
+ android:paddingLeft="@dimen/detail_item_side_margin"
+ android:singleLine="true"
+ android:gravity="left|center_vertical"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textColor="@color/detail_header_view_text_color"
+ style="@android:style/Widget.Holo.ActionBar.TabView" />
+
+ <TextView android:id="@+id/status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"
+ android:layout_marginTop="@dimen/detail_update_tab_vertical_margin"
+ android:paddingLeft="@dimen/detail_update_tab_side_padding"
+ android:paddingRight="@dimen/detail_update_tab_side_padding"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:maxLines="3"/>
+
+ <TextView android:id="@+id/status_date"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/status"
+ android:layout_marginBottom="@dimen/detail_update_tab_vertical_margin"
+ android:paddingLeft="@dimen/detail_update_tab_side_padding"
+ android:paddingRight="@dimen/detail_update_tab_side_padding"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?android:attr/textColorTertiary"/>
+</RelativeLayout> \ No newline at end of file
diff --git a/res/layout/contact_detail_activity.xml b/res/layout/contact_detail_activity.xml
index 9408f89bc..744f3436c 100644
--- a/res/layout/contact_detail_activity.xml
+++ b/res/layout/contact_detail_activity.xml
@@ -14,12 +14,19 @@
limitations under the License.
-->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/contact_detail_view"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:orientation="vertical">
- <fragment class="com.android.contacts.detail.ContactDetailFragment"
- android:id="@+id/contact_detail_fragment"
- android:layout_width="match_parent"
- android:layout_height="match_parent" />
-</FrameLayout>
+ <com.android.contacts.detail.ContactDetailTabCarousel
+ android:id="@+id/tab_carousel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"/>
+
+ <android.support.v4.view.ViewPager
+ android:id="@+id/pager"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+</LinearLayout>
diff --git a/res/layout/contact_detail_tab_carousel.xml b/res/layout/contact_detail_tab_carousel.xml
new file mode 100644
index 000000000..a7321ee91
--- /dev/null
+++ b/res/layout/contact_detail_tab_carousel.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<HorizontalScrollView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:scrollbars="none">
+
+ <LinearLayout
+ android:id="@+id/tab_container"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <include
+ android:id="@+id/tab_about"
+ layout="@layout/carousel_about_tab" />
+
+ <include
+ android:id="@+id/tab_update"
+ layout="@layout/carousel_updates_tab" />
+
+ </LinearLayout>
+
+</HorizontalScrollView> \ No newline at end of file
diff --git a/res/layout/contact_detail_updates_fragment.xml b/res/layout/contact_detail_updates_fragment.xml
new file mode 100644
index 000000000..7baba42a5
--- /dev/null
+++ b/res/layout/contact_detail_updates_fragment.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/contact_detail"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <TextView android:id="@+id/emptyText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/no_contact_details"
+ android:textSize="20sp"
+ android:textColor="?android:attr/textColorSecondary"
+ android:paddingLeft="10dip"
+ android:paddingRight="10dip"
+ android:paddingTop="10dip"/>
+</LinearLayout>
+
diff --git a/res/layout/simple_contact_detail_header_view_list_item.xml b/res/layout/simple_contact_detail_header_view_list_item.xml
new file mode 100644
index 000000000..117aef1a8
--- /dev/null
+++ b/res/layout/simple_contact_detail_header_view_list_item.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+ This view temporarily holds the extra information that used to be in the
+ original contact detail header view, but now must move into the list because
+ of the new tab carousel. TODO: Integrate this better into the list as provided
+ by the mocks.
+-->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/phonetic_name"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="10dip"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+
+ <TextView
+ android:id="@+id/attribution"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="10dip"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 9a6081504..60873b17d 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -49,6 +49,9 @@
<!-- Color of the text indicating the type of entry (e.g. Home, Work etc) -->
<color name="detail_header_view_text_color">#FFFFFF</color>
+ <!-- Color of the background of the tabs on the contact detail page -->
+ <color name="detail_tab_background">#DBDBDB</color>
+
<!-- Color of the text foreground and background of Regular Sized ContactTile -->
<color name="contact_tile_regular_text">#2B1B17</color>
<color name="contact_tile_regular_text_background">#FFFFFF</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 68655d833..f36975271 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -70,6 +70,21 @@
<!-- Font size for the entries in a spinner in the contact editor. -->
<dimen name="editor_field_spinner_text_size">10sp</dimen>
+ <!-- Height of the tab carousel on the contact detail page -->
+ <dimen name="detail_tab_carousel_height">150dip</dimen>
+
+ <!-- Width of a tab in the tab carousel on the contact detail page -->
+ <dimen name="detail_tab_carousel_tab_width">240dip</dimen>
+
+ <!-- Height of the tab text label in the tab carousel on the contact detail page -->
+ <dimen name="detail_tab_carousel_tab_label_height">40dip</dimen>
+
+ <!-- Vertical margin of the text within the update tab in the tab carousel -->
+ <dimen name="detail_update_tab_vertical_margin">20dip</dimen>
+
+ <!-- Left and right padding of the text within the update tab in the tab carousel -->
+ <dimen name="detail_update_tab_side_padding">10dip</dimen>
+
<!-- Left and right padding for a contact detail item -->
<dimen name="detail_item_icon_margin">10dip</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f259ea702..c9b278761 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -78,6 +78,12 @@
creating a new contact. This string represents the built in way to create the contact. -->
<string name="insertContactDescription">Create contact</string>
+ <!-- The tab label for the contact detail activity that displays information about the contact [CHAR LIMIT=11] -->
+ <string name="contactDetailAbout">About</string>
+
+ <!-- The tab label for the contact detail activity that displays information about the contact [CHAR LIMIT=11] -->
+ <string name="contactDetailUpdates">Updates</string>
+
<!-- Hint text in the search box when the user hits the Search key while in the contacts app -->
<string name="searchHint">Search contacts</string>