New minitab assets.
Add new minitab assets, and fix z-ordering so the selcted tab is always
drawn on top, and it's drop shadows bleed over onto adjacent tabs.
Change-Id: I100e20411972285675de42f356c201326c0386f6
diff --git a/res/drawable-finger/tab_focused.9.png b/res/drawable-finger/tab_focused.9.png
index fbc1d3f..6190694 100644
--- a/res/drawable-finger/tab_focused.9.png
+++ 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
index 0ca71f0..0e3bdb0 100644
--- a/res/drawable-finger/tab_focused_bottom.9.png
+++ b/res/drawable-finger/tab_focused_bottom.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
index 780cdb5..4bf95d5 100644
--- a/res/drawable-finger/tab_pressed_bottom.9.png
+++ b/res/drawable-finger/tab_pressed_bottom.9.png
Binary files differ
diff --git a/res/drawable-finger/tab_selected.9.png b/res/drawable-finger/tab_selected.9.png
index 3e7ca81..b3c9fb1 100644
--- a/res/drawable-finger/tab_selected.9.png
+++ 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
index 0b61685..f69f08e 100644
--- a/res/drawable-finger/tab_selected_bottom.9.png
+++ b/res/drawable-finger/tab_selected_bottom.9.png
Binary files differ
diff --git a/res/layout-finger/all_tab_indicator.xml b/res/layout-finger/all_tab_indicator.xml
index ca9ee34..c8a4c44 100644
--- a/res/layout-finger/all_tab_indicator.xml
+++ b/res/layout-finger/all_tab_indicator.xml
@@ -18,6 +18,8 @@
android:layout_width="wrap_content"
android:layout_height="40dip"
android:layout_weight="1"
+ android:layout_marginLeft="-4dip"
+ android:layout_marginRight="-4dip"
android:minWidth="72dip"
android:background="@+drawable/tab_indicator_bg">
diff --git a/res/layout-finger/tab_indicator.xml b/res/layout-finger/tab_indicator.xml
index a9db229..dad6031 100644
--- a/res/layout-finger/tab_indicator.xml
+++ b/res/layout-finger/tab_indicator.xml
@@ -18,6 +18,8 @@
android:layout_width="wrap_content"
android:layout_height="40dip"
android:layout_weight="1"
+ android:layout_marginLeft="-4dip"
+ android:layout_marginRight="-4dip"
android:minWidth="72dip"
android:background="@+drawable/tab_indicator_bg">
diff --git a/src/com/android/contacts/TabStripView.java b/src/com/android/contacts/TabStripView.java
index ae80be0..9b875d1 100644
--- a/src/com/android/contacts/TabStripView.java
+++ b/src/com/android/contacts/TabStripView.java
@@ -46,6 +46,7 @@
}
private void init() {
+ mGroupFlags |= FLAG_USE_CHILD_DRAWING_ORDER;
mBottomLeftStrip = mContext.getResources().getDrawable(
R.drawable.tab_bottom);
mBottomRightStrip = mContext.getResources().getDrawable(
@@ -68,6 +69,19 @@
}
@Override
+ protected int getChildDrawingOrder(int childCount, int i) {
+ // Always draw the selected tab last, so that drop shadows are drawn
+ // in the correct z-order.
+ if (i == childCount - 1) {
+ return mSelectedTabIndex;
+ } else if (i >= mSelectedTabIndex) {
+ return i + 1;
+ } else {
+ return i;
+ }
+ }
+
+ @Override
public void childDrawableStateChanged(View child) {
if (child == getChildAt(mSelectedTabIndex)) {
// To make sure that the bottom strip is redrawn