Update minitab assets and behavior to match spec.
diff --git a/res/color-finger/tab_indicator_text.xml b/res/color-finger/tab_indicator_text.xml
index 0fe2cd9..50ca824 100644
--- a/res/color-finger/tab_indicator_text.xml
+++ b/res/color-finger/tab_indicator_text.xml
@@ -15,6 +15,6 @@
-->
<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 -->
+ <item android:state_selected="true" android:color="@*android:color/dim_foreground_dark_inverse"/>
+ <item android:color="@*android:color/dim_foreground_dark"/> <!-- not selected -->
</selector>
diff --git a/res/drawable/tab_indicator_bg.xml b/res/drawable-finger/tab_bottom.xml
similarity index 65%
copy from res/drawable/tab_indicator_bg.xml
copy to res/drawable-finger/tab_bottom.xml
index 211372f..96f1a24 100644
--- a/res/drawable/tab_indicator_bg.xml
+++ b/res/drawable-finger/tab_bottom.xml
@@ -15,32 +15,27 @@
-->
<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_pressed="true" android:drawable="@drawable/tab_pressed_bottom"/>
+ <item android:state_focused="false" android:drawable="@drawable/tab_selected_bottom"/>
+ <item android:state_focused="true" android:drawable="@drawable/tab_focused_bottom"/>
+ -->
+
<item
android:state_focused="false"
android:state_selected="true"
android:state_pressed="false"
- android:drawable="@drawable/tab_selected" />
+ android:drawable="@drawable/tab_selected_bottom" />
<!-- 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" />
+ android:drawable="@drawable/tab_focused_bottom" />
<!-- Pressed -->
<item
android:state_pressed="true"
- android:drawable="@drawable/tab_pressed" />
+ android:drawable="@drawable/tab_pressed_bottom" />
</selector>
\ No newline at end of file
diff --git a/res/drawable/tab_divider.xml b/res/drawable-finger/tab_divider.xml
similarity index 100%
rename from res/drawable/tab_divider.xml
rename to res/drawable-finger/tab_divider.xml
diff --git a/res/drawable/tab_divider_res.9.png b/res/drawable-finger/tab_divider_res.9.png
similarity index 100%
rename from res/drawable/tab_divider_res.9.png
rename to res/drawable-finger/tab_divider_res.9.png
Binary files differ
diff --git a/res/drawable-finger/tab_focused.9.png b/res/drawable-finger/tab_focused.9.png
new file mode 100644
index 0000000..389cefd
--- /dev/null
+++ b/res/drawable-finger/tab_focused.9.png
Binary files differ
diff --git a/res/drawable-finger/tab_focused_bottom.9.png b/res/drawable-finger/tab_focused_bottom.9.png
new file mode 100644
index 0000000..64298be
--- /dev/null
+++ b/res/drawable-finger/tab_focused_bottom.9.png
Binary files differ
diff --git a/res/drawable-finger/tab_focused_dithered.xml b/res/drawable-finger/tab_focused_dithered.xml
new file mode 100644
index 0000000..c842543
--- /dev/null
+++ b/res/drawable-finger/tab_focused_dithered.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_focused"
+ android:dither="true"
+/>
diff --git a/res/drawable/tab_indicator_bg.xml b/res/drawable-finger/tab_indicator_bg.xml
similarity index 75%
rename from res/drawable/tab_indicator_bg.xml
rename to res/drawable-finger/tab_indicator_bg.xml
index 211372f..15ab727 100644
--- a/res/drawable/tab_indicator_bg.xml
+++ b/res/drawable-finger/tab_indicator_bg.xml
@@ -20,27 +20,23 @@
android:state_focused="false"
android:state_selected="false"
android:state_pressed="false"
- android:drawable="@drawable/tab_unselected" />
+ android:drawable="@drawable/tab_unselected_dithered" />
<item
android:state_focused="false"
android:state_selected="true"
android:state_pressed="false"
- android:drawable="@drawable/tab_selected" />
+ android:drawable="@drawable/tab_selected_dithered" />
<!-- 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" />
+ android:drawable="@drawable/tab_focused_dithered" />
<!-- Pressed -->
<item
android:state_pressed="true"
- android:drawable="@drawable/tab_pressed" />
+ android:drawable="@drawable/tab_pressed_dithered" />
+
</selector>
\ No newline at end of file
diff --git a/res/drawable/tab_left_arrow.png b/res/drawable-finger/tab_left_arrow.png
similarity index 100%
rename from res/drawable/tab_left_arrow.png
rename to res/drawable-finger/tab_left_arrow.png
Binary files differ
diff --git a/res/drawable-finger/tab_pressed.9.png b/res/drawable-finger/tab_pressed.9.png
new file mode 100644
index 0000000..f8c06fb
--- /dev/null
+++ b/res/drawable-finger/tab_pressed.9.png
Binary files differ
diff --git a/res/drawable-finger/tab_pressed_bottom.9.png b/res/drawable-finger/tab_pressed_bottom.9.png
new file mode 100644
index 0000000..1447a4e
--- /dev/null
+++ b/res/drawable-finger/tab_pressed_bottom.9.png
Binary files differ
diff --git a/res/drawable-finger/tab_pressed_dithered.xml b/res/drawable-finger/tab_pressed_dithered.xml
new file mode 100644
index 0000000..2469678
--- /dev/null
+++ b/res/drawable-finger/tab_pressed_dithered.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_pressed"
+ android:dither="true"
+/>
diff --git a/res/drawable/tab_right_arrow.png b/res/drawable-finger/tab_right_arrow.png
similarity index 100%
rename from res/drawable/tab_right_arrow.png
rename to res/drawable-finger/tab_right_arrow.png
Binary files differ
diff --git a/res/drawable-finger/tab_selected.9.png b/res/drawable-finger/tab_selected.9.png
new file mode 100644
index 0000000..4cb9d67
--- /dev/null
+++ b/res/drawable-finger/tab_selected.9.png
Binary files differ
diff --git a/res/drawable-finger/tab_selected_bottom.9.png b/res/drawable-finger/tab_selected_bottom.9.png
new file mode 100644
index 0000000..55d6cad
--- /dev/null
+++ b/res/drawable-finger/tab_selected_bottom.9.png
Binary files differ
diff --git a/res/drawable-finger/tab_selected_dithered.xml b/res/drawable-finger/tab_selected_dithered.xml
new file mode 100644
index 0000000..d1d235c
--- /dev/null
+++ b/res/drawable-finger/tab_selected_dithered.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_selected"
+ android:dither="true"
+/>
diff --git a/res/drawable-finger/tab_unselected.9.png b/res/drawable-finger/tab_unselected.9.png
new file mode 100644
index 0000000..4d4c017
--- /dev/null
+++ b/res/drawable-finger/tab_unselected.9.png
Binary files differ
diff --git a/res/drawable-finger/tab_unselected_dithered.xml b/res/drawable-finger/tab_unselected_dithered.xml
new file mode 100644
index 0000000..32c6509
--- /dev/null
+++ b/res/drawable-finger/tab_unselected_dithered.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_unselected"
+ android:dither="true"
+/>
diff --git a/res/drawable/tab_focused.9.png b/res/drawable/tab_focused.9.png
deleted file mode 100644
index adbf191..0000000
--- a/res/drawable/tab_focused.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/tab_focused_selected.9.png b/res/drawable/tab_focused_selected.9.png
deleted file mode 100644
index 2f18b65..0000000
--- a/res/drawable/tab_focused_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/tab_pressed.9.png b/res/drawable/tab_pressed.9.png
deleted file mode 100644
index cb624ef..0000000
--- a/res/drawable/tab_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/tab_selected.9.png b/res/drawable/tab_selected.9.png
deleted file mode 100644
index 24a389f..0000000
--- a/res/drawable/tab_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/tab_unselected.9.png b/res/drawable/tab_unselected.9.png
deleted file mode 100644
index 4130457..0000000
--- a/res/drawable/tab_unselected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/tab_widget_bg.9.png b/res/drawable/tab_widget_bg.9.png
deleted file mode 100644
index 39427ee..0000000
--- a/res/drawable/tab_widget_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/layout-finger/all_tab_indicator.xml b/res/layout-finger/all_tab_indicator.xml
index daef9c4..fd5c35f 100644
--- a/res/layout-finger/all_tab_indicator.xml
+++ b/res/layout-finger/all_tab_indicator.xml
@@ -15,7 +15,7 @@
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="120dip"
+ android:layout_width="80dip"
android:layout_height="40dip"
android:background="@+drawable/tab_indicator_bg">
diff --git a/res/layout-finger/contact_card_layout.xml b/res/layout-finger/contact_card_layout.xml
index d32ce6f..899f354 100644
--- a/res/layout-finger/contact_card_layout.xml
+++ b/res/layout-finger/contact_card_layout.xml
@@ -27,8 +27,7 @@
<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"/>
+ android:layout_height="wrap_content"/>
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
diff --git a/res/layout-finger/tab_indicator.xml b/res/layout-finger/tab_indicator.xml
index 68f03fd..119f86e 100644
--- a/res/layout-finger/tab_indicator.xml
+++ b/res/layout-finger/tab_indicator.xml
@@ -15,7 +15,7 @@
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="76dip"
+ android:layout_width="80dip"
android:layout_height="40dip"
android:background="@+drawable/tab_indicator_bg">
diff --git a/res/layout-finger/tab_layout.xml b/res/layout-finger/tab_layout.xml
index f9c7364..23359b7 100644
--- a/res/layout-finger/tab_layout.xml
+++ b/res/layout-finger/tab_layout.xml
@@ -14,16 +14,16 @@
limitations under the License.
-->
-<com.android.contacts.NoDragHorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+<HorizontalScrollView 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
+ <com.android.contacts.TabStripView
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
+</HorizontalScrollView>
\ No newline at end of file
diff --git a/res/layout-finger/tab_left_arrow.xml b/res/layout-finger/tab_left_arrow.xml
index eb29928..58c8b92 100644
--- a/res/layout-finger/tab_left_arrow.xml
+++ b/res/layout-finger/tab_left_arrow.xml
@@ -14,27 +14,14 @@
limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="44dip"
- android:layout_height="40dip"
+<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/arrow"
+ android:layout_width="40dip"
+ android:layout_height="37dip"
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
+ android:layout_alignParentTop="true"
+ android:layout_weight="1"
+ android:background="@drawable/tab_indicator_bg"
+ android:scaleType="centerInside"
+ android:src="@drawable/tab_left_arrow"
+ />
diff --git a/res/layout-finger/tab_right_arrow.xml b/res/layout-finger/tab_right_arrow.xml
index c40029b..febc7f5 100644
--- a/res/layout-finger/tab_right_arrow.xml
+++ b/res/layout-finger/tab_right_arrow.xml
@@ -14,27 +14,14 @@
limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="44dip"
- android:layout_height="40dip"
+<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/arrow"
+ android:layout_width="40dip"
+ android:layout_height="37dip"
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
+ android:layout_alignParentTop="true"
+ android:layout_weight="1"
+ android:background="@drawable/tab_indicator_bg"
+ android:scaleType="centerInside"
+ android:src="@drawable/tab_right_arrow"
+ />
diff --git a/res/layout/act_edit.xml b/res/layout/act_edit.xml
index 1a9f99c..de62e5e 100644
--- a/res/layout/act_edit.xml
+++ b/res/layout/act_edit.xml
@@ -35,8 +35,7 @@
<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" />
+ android:layout_height="wrap_content" />
<FrameLayout
android:id="@android:id/tabcontent"