First pass at tabbed contact viewing.
ScrollingTabWidget - This is a generic widget for displaying tab like
elements, that may not fit on the screen. The visual design for this
widget is still in flux.
BaseContactCardActivity - This is an abstract class that should be
extended by any Activity that displays information about a specific
contact and allows filtering on different RawContacts associated with
the contact. ViewContactActivity.java extends this class.
EditContactActivity will want to eventually. The abstract class
implements OnTabSelectionChangedListener and will get called on
onTabSelectionChanged() when a new tab is selected. This way the
activity can react to tab selection changes.
ViewContactActivity - This now extends BaseContactActivity.
diff --git a/res/color-finger/tab_indicator_text.xml b/res/color-finger/tab_indicator_text.xml
new file mode 100644
index 0000000..0fe2cd9
--- /dev/null
+++ b/res/color-finger/tab_indicator_text.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_selected="true" android:color="@*android:color/dim_foreground_dark"/>
+ <item android:color="@*android:color/dim_foreground_dark_inverse"/> <!-- not selected -->
+</selector>
diff --git a/res/drawable-finger/contact_picture_bg.9.png b/res/drawable-finger/contact_picture_bg.9.png
new file mode 100644
index 0000000..ae9c709
--- /dev/null
+++ b/res/drawable-finger/contact_picture_bg.9.png
Binary files differ
diff --git a/res/drawable/contact_header_bg.9.png b/res/drawable/contact_header_bg.9.png
new file mode 100644
index 0000000..7f9a5a3
--- /dev/null
+++ b/res/drawable/contact_header_bg.9.png
Binary files differ
diff --git a/res/drawable/tab_divider.xml b/res/drawable/tab_divider.xml
new file mode 100644
index 0000000..2590ce7
--- /dev/null
+++ b/res/drawable/tab_divider.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<nine-patch xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/tab_divider_res"
+ android:height="48dip"
+/>
diff --git a/res/drawable/tab_divider_res.9.png b/res/drawable/tab_divider_res.9.png
new file mode 100644
index 0000000..3fdc372
--- /dev/null
+++ b/res/drawable/tab_divider_res.9.png
Binary files differ
diff --git a/res/drawable/tab_focused.9.png b/res/drawable/tab_focused.9.png
new file mode 100644
index 0000000..adbf191
--- /dev/null
+++ b/res/drawable/tab_focused.9.png
Binary files differ
diff --git a/res/drawable/tab_focused_selected.9.png b/res/drawable/tab_focused_selected.9.png
new file mode 100644
index 0000000..2f18b65
--- /dev/null
+++ b/res/drawable/tab_focused_selected.9.png
Binary files differ
diff --git a/res/drawable/tab_indicator_bg.xml b/res/drawable/tab_indicator_bg.xml
new file mode 100644
index 0000000..211372f
--- /dev/null
+++ b/res/drawable/tab_indicator_bg.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- Non focused states -->
+ <item
+ android:state_focused="false"
+ android:state_selected="false"
+ android:state_pressed="false"
+ android:drawable="@drawable/tab_unselected" />
+ <item
+ android:state_focused="false"
+ android:state_selected="true"
+ android:state_pressed="false"
+ android:drawable="@drawable/tab_selected" />
+
+ <!-- Focused states -->
+ <item
+ android:state_focused="true"
+ android:state_selected="false"
+ android:state_pressed="false"
+ android:drawable="@drawable/tab_focused" />
+ <item
+ android:state_focused="true"
+ android:state_selected="true"
+ android:state_pressed="false"
+ android:drawable="@drawable/tab_focused_selected" />
+
+ <!-- Pressed -->
+ <item
+ android:state_pressed="true"
+ android:drawable="@drawable/tab_pressed" />
+</selector>
\ No newline at end of file
diff --git a/res/drawable/tab_left_arrow.png b/res/drawable/tab_left_arrow.png
new file mode 100644
index 0000000..e35d58d
--- /dev/null
+++ b/res/drawable/tab_left_arrow.png
Binary files differ
diff --git a/res/drawable/tab_pressed.9.png b/res/drawable/tab_pressed.9.png
new file mode 100644
index 0000000..cb624ef
--- /dev/null
+++ b/res/drawable/tab_pressed.9.png
Binary files differ
diff --git a/res/drawable/tab_right_arrow.png b/res/drawable/tab_right_arrow.png
new file mode 100644
index 0000000..8acbba0
--- /dev/null
+++ b/res/drawable/tab_right_arrow.png
Binary files differ
diff --git a/res/drawable/tab_selected.9.png b/res/drawable/tab_selected.9.png
new file mode 100644
index 0000000..24a389f
--- /dev/null
+++ b/res/drawable/tab_selected.9.png
Binary files differ
diff --git a/res/drawable/tab_unselected.9.png b/res/drawable/tab_unselected.9.png
new file mode 100644
index 0000000..4130457
--- /dev/null
+++ b/res/drawable/tab_unselected.9.png
Binary files differ
diff --git a/res/drawable/tab_widget_bg.9.png b/res/drawable/tab_widget_bg.9.png
new file mode 100644
index 0000000..39427ee
--- /dev/null
+++ b/res/drawable/tab_widget_bg.9.png
Binary files differ
diff --git a/res/layout-finger/all_tab_indicator.xml b/res/layout-finger/all_tab_indicator.xml
new file mode 100644
index 0000000..daef9c4
--- /dev/null
+++ b/res/layout-finger/all_tab_indicator.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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="120dip"
+ android:layout_height="40dip"
+ android:background="@+drawable/tab_indicator_bg">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true"
+ android:text="@string/all_tab_label"
+ android:textColor="@color/tab_indicator_text"
+ android:textSize="20dip"
+ />
+
+</RelativeLayout>
diff --git a/res/layout-finger/contact_card_layout.xml b/res/layout-finger/contact_card_layout.xml
new file mode 100644
index 0000000..ee2fcf8
--- /dev/null
+++ b/res/layout-finger/contact_card_layout.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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/card_root_view"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+
+ <LinearLayout android:id="@+id/banner"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:background="@drawable/contact_header_bg"
+ android:paddingRight="5dip"
+ android:gravity="center_vertical">
+
+ <ImageView android:id="@+id/photo"
+ android:layout_width="64dip"
+ android:layout_height="64dip"
+ android:layout_marginRight="7dip"
+ android:layout_marginLeft="2dip"
+ android:scaleType="fitCenter"
+ android:background="@drawable/contact_picture_bg"/>
+
+ <LinearLayout
+ android:layout_width="0dip"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <!-- "Name" field is locale-specific. -->
+ <include layout="@layout/view_contact_name"/>
+
+ <TextView android:id="@+id/status"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:maxLines="2"/>
+
+ </LinearLayout>
+
+ <CheckBox android:id="@+id/star"
+ style="?android:attr/starStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+
+ </LinearLayout>
+
+ <com.android.contacts.ScrollingTabWidget android:id="@+id/tab_widget"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="@drawable/tab_widget_bg"/>
+
+ <FrameLayout android:id="@android:id/tabcontent"
+ android:layout_width="fill_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1">
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="@drawable/title_bar_shadow"
+ />
+ </FrameLayout>
+
+
+</LinearLayout>
+
diff --git a/res/layout-finger/tab_divider.xml b/res/layout-finger/tab_divider.xml
new file mode 100644
index 0000000..8e0e65d
--- /dev/null
+++ b/res/layout-finger/tab_divider.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_height="fill_parent"
+ android:background="@drawable/tab_divider"/>
\ No newline at end of file
diff --git a/res/layout-finger/tab_indicator.xml b/res/layout-finger/tab_indicator.xml
new file mode 100644
index 0000000..ff64d5e
--- /dev/null
+++ b/res/layout-finger/tab_indicator.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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="76dip"
+ android:layout_height="40dip"
+ android:background="@+drawable/tab_indicator_bg">
+
+ <ImageView android:id="@+id/tab_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ />
+
+ <TextView android:id="@+id/tab_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_centerHorizontal="true"
+ android:textColor="@+color/tab_indicator_text"
+ android:textSize="20dip"
+ />
+
+</RelativeLayout>
diff --git a/res/layout-finger/tab_layout.xml b/res/layout-finger/tab_layout.xml
new file mode 100644
index 0000000..f9c7364
--- /dev/null
+++ b/res/layout-finger/tab_layout.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<com.android.contacts.NoDragHorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:scrollbars="none"
+ android:fadingEdgeLength="0dip">
+
+ <LinearLayout
+ android:id="@android:id/tabs"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
+</com.android.contacts.NoDragHorizontalScrollView>
\ No newline at end of file
diff --git a/res/layout-finger/tab_left_arrow.xml b/res/layout-finger/tab_left_arrow.xml
new file mode 100644
index 0000000..eb29928
--- /dev/null
+++ b/res/layout-finger/tab_left_arrow.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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:layout_width="44dip"
+ android:layout_height="40dip"
+ android:layout_alignParentLeft="true"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:background="@drawable/tab_indicator_bg"
+ android:id="@+id/arrow"
+ android:scaleType="centerInside"
+ android:src="@drawable/tab_left_arrow"
+ />
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:id="@+id/divider"
+ android:src="@drawable/tab_divider"
+ />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout-finger/tab_right_arrow.xml b/res/layout-finger/tab_right_arrow.xml
new file mode 100644
index 0000000..c40029b
--- /dev/null
+++ b/res/layout-finger/tab_right_arrow.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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:layout_width="44dip"
+ android:layout_height="40dip"
+ android:layout_alignParentRight="true"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:id="@+id/divider"
+ android:src="@drawable/tab_divider"
+ />
+
+ <ImageView
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:background="@drawable/tab_indicator_bg"
+ android:id="@+id/arrow"
+ android:scaleType="centerInside"
+ android:src="@drawable/tab_right_arrow"
+ />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout-finger/view_contact.xml b/res/layout-finger/view_contact.xml
deleted file mode 100644
index 4a0f252..0000000
--- a/res/layout-finger/view_contact.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
->
-
- <LinearLayout android:id="@+id/banner"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:background="@android:drawable/title_bar_tall"
- android:paddingRight="5dip"
- android:gravity="center_vertical"
- >
-
- <ImageView android:id="@+id/photo"
- style="?android:attr/imageWellStyle"
- android:layout_width="78dip"
- android:layout_height="78dip"
- android:layout_marginRight="7dip"
- android:layout_marginLeft="2dip"
- android:scaleType="fitCenter"
- android:background="@drawable/btn_contact_picture"
- />
-
- <!-- "Name" field is locale-specific. -->
- <include layout="@layout/view_contact_name"/>
-
- <CheckBox android:id="@+id/star"
- style="?android:attr/starStyle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- />
-
- </LinearLayout>
-
- <FrameLayout
- android:layout_width="fill_parent"
- android:layout_height="0dip"
- android:layout_weight="1"
- >
-
- <View
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="@drawable/title_bar_shadow"
- />
-
- <ListView android:id="@android:id/list"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:scrollbarStyle="outsideOverlay"
- />
- </FrameLayout>
-</LinearLayout>
diff --git a/res/layout-finger/view_contact_name.xml b/res/layout-finger/view_contact_name.xml
index 126c69b..aec943e 100644
--- a/res/layout-finger/view_contact_name.xml
+++ b/res/layout-finger/view_contact_name.xml
@@ -17,12 +17,10 @@
<!-- In the default locale, the "Name" field is a single TextView -->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/name"
- android:layout_width="0dip"
- android:layout_weight="1"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:shadowColor="#BB000000"
- android:shadowRadius="2.75"
+ android:textAppearance="?android:attr/textAppearanceLargeInverse"
+ android:textColor="@android:color/secondary_text_light"
android:maxLines="2"
android:ellipsize="end"
/>
diff --git a/res/layout-ja-finger/view_contact_name.xml b/res/layout-ja-finger/view_contact_name.xml
index bd72bba..03332b1 100644
--- a/res/layout-ja-finger/view_contact_name.xml
+++ b/res/layout-ja-finger/view_contact_name.xml
@@ -25,17 +25,15 @@
<TextView android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:shadowColor="#BB000000"
- android:shadowRadius="2.75"
+ android:textAppearance="?android:attr/textAppearanceLargeInverse"
+ android:textColor="@android:color/secondary_text_light"
/>
<TextView android:id="@+id/phonetic_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:shadowColor="#BB000000"
- android:shadowRadius="2.75"
+ android:textAppearance="?android:attr/textAppearanceSmallInverse"
+ android:textColor="@android:color/secondary_text_light"
/>
</LinearLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6b18ce5..c6d1401 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -570,6 +570,8 @@
the email address, e.g. "Add xyz@foo.com to contacts?" -->
<string name="add_contact_dlg_message_fmt">Add \"<xliff:g id="email">%s</xliff:g>\" to contacts?</string>
+ <!-- Label for the all data tab in the view and edit card -->
+ <string name="all_tab_label">All</string>
<!-- Content description values -->
<!-- String describing the image on ImageButton one