Loading core/java/android/widget/TabHost.java +14 −10 Original line number Diff line number Diff line Loading @@ -502,6 +502,8 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); View tabIndicator = inflater.inflate(R.layout.tab_indicator, mTabWidget, // tab widget is the parent false); // no inflate params // TODO: Move this to xml when bug 2068024 is resolved. tabIndicator.getBackground().setDither(true); final TextView tv = (TextView) tabIndicator.findViewById(R.id.title); tv.setText(mLabel); Loading Loading @@ -529,6 +531,8 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); View tabIndicator = inflater.inflate(R.layout.tab_indicator, mTabWidget, // tab widget is the parent false); // no inflate params // TODO: Move this to xml when bug 2068024 is resolved. tabIndicator.getBackground().setDither(true); final TextView tv = (TextView) tabIndicator.findViewById(R.id.title); tv.setText(mLabel); Loading core/java/android/widget/TabWidget.java +53 −38 Original line number Diff line number Diff line Loading @@ -77,8 +77,23 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener { super.onSizeChanged(w, h, oldw, oldh); } @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 mSelectedTab; } else if (i >= mSelectedTab) { return i + 1; } else { return i; } } private void initTabWidget() { setOrientation(LinearLayout.HORIZONTAL); mGroupFlags |= FLAG_USE_CHILD_DRAWING_ORDER; mBottomLeftStrip = mContext.getResources().getDrawable( com.android.internal.R.drawable.tab_bottom_left); mBottomRightStrip = mContext.getResources().getDrawable( Loading core/res/res/color/tab_indicator_text.xml +2 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,6 @@ --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_selected="true" android:color="#323232"/> <item android:color="#FFF"/> <!-- not selected --> <item android:state_selected="true" android:color="#ffffff"/> <item android:color="#808080"/> <!-- not selected --> </selector> core/res/res/drawable/dark_header.9.png −18 B (161 B) Loading image diff... core/res/res/drawable/dark_header_dither.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?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/dark_header" android:dither="true" /> Loading
core/java/android/widget/TabHost.java +14 −10 Original line number Diff line number Diff line Loading @@ -502,6 +502,8 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); View tabIndicator = inflater.inflate(R.layout.tab_indicator, mTabWidget, // tab widget is the parent false); // no inflate params // TODO: Move this to xml when bug 2068024 is resolved. tabIndicator.getBackground().setDither(true); final TextView tv = (TextView) tabIndicator.findViewById(R.id.title); tv.setText(mLabel); Loading Loading @@ -529,6 +531,8 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); View tabIndicator = inflater.inflate(R.layout.tab_indicator, mTabWidget, // tab widget is the parent false); // no inflate params // TODO: Move this to xml when bug 2068024 is resolved. tabIndicator.getBackground().setDither(true); final TextView tv = (TextView) tabIndicator.findViewById(R.id.title); tv.setText(mLabel); Loading
core/java/android/widget/TabWidget.java +53 −38 Original line number Diff line number Diff line Loading @@ -77,8 +77,23 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener { super.onSizeChanged(w, h, oldw, oldh); } @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 mSelectedTab; } else if (i >= mSelectedTab) { return i + 1; } else { return i; } } private void initTabWidget() { setOrientation(LinearLayout.HORIZONTAL); mGroupFlags |= FLAG_USE_CHILD_DRAWING_ORDER; mBottomLeftStrip = mContext.getResources().getDrawable( com.android.internal.R.drawable.tab_bottom_left); mBottomRightStrip = mContext.getResources().getDrawable( Loading
core/res/res/color/tab_indicator_text.xml +2 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,6 @@ --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_selected="true" android:color="#323232"/> <item android:color="#FFF"/> <!-- not selected --> <item android:state_selected="true" android:color="#ffffff"/> <item android:color="#808080"/> <!-- not selected --> </selector>
core/res/res/drawable/dark_header_dither.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?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/dark_header" android:dither="true" />