Holo styling and metrics; holo spinners

Change-Id: Ib6d80e5e1a79b7a4ff208df8dbc097e7b9228d13
This commit is contained in:
Adam Powell
2010-10-13 15:28:31 -07:00
parent 7ffe05227e
commit 89edde3efa
49 changed files with 133 additions and 17 deletions

View File

@@ -78,7 +78,6 @@ public class AlertDialog extends Dialog implements DialogInterface {
TypedValue outValue = new TypedValue();
context.getTheme().resolveAttribute(com.android.internal.R.attr.alertDialogTheme,
outValue, true);
Log.d("AlertDialog", "getDefaultDialogTheme data " + outValue.data + " id " + outValue.resourceId);
return outValue.resourceId;
}

View File

@@ -351,7 +351,7 @@ public class ActionBarView extends ViewGroup {
break;
case ActionBar.NAVIGATION_MODE_DROPDOWN_LIST:
mSpinner = new Spinner(mContext, null,
com.android.internal.R.attr.dropDownSpinnerStyle);
com.android.internal.R.attr.actionDropDownStyle);
mSpinner.setOnItemSelectedListener(mNavItemSelectedListener);
addView(mSpinner);
break;

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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_enabled="false"
android:drawable="@drawable/spinner_disabled_holo_dark" />
<item android:state_pressed="true"
android:drawable="@drawable/spinner_pressed_holo_dark" />
<item android:state_pressed="false" android:state_focused="true"
android:drawable="@drawable/spinner_focused_holo_dark" />
<item android:drawable="@drawable/spinner_default_holo_dark" />
</selector>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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_enabled="false"
android:drawable="@drawable/spinner_disabled_holo_light" />
<item android:state_pressed="true"
android:drawable="@drawable/spinner_pressed_holo_light" />
<item android:state_pressed="false" android:state_focused="true"
android:drawable="@drawable/spinner_focused_holo_light" />
<item android:drawable="@drawable/spinner_default_holo_light" />
</selector>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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_enabled="false"
android:drawable="@drawable/spinner_cab_disabled_holo_dark" />
<item android:state_pressed="true"
android:drawable="@drawable/spinner_cab_pressed_holo_dark" />
<item android:state_pressed="false" android:state_focused="true"
android:drawable="@drawable/spinner_cab_focused_holo_dark" />
<item android:drawable="@drawable/spinner_cab_default_holo_dark" />
</selector>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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_enabled="false"
android:drawable="@drawable/spinner_cab_disabled_holo_light" />
<item android:state_pressed="true"
android:drawable="@drawable/spinner_cab_pressed_holo_light" />
<item android:state_pressed="false" android:state_focused="true"
android:drawable="@drawable/spinner_cab_focused_holo_light" />
<item android:drawable="@drawable/spinner_cab_default_holo_light" />
</selector>

View File

@@ -17,7 +17,11 @@
<com.android.internal.view.menu.ActionMenuItemView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center">
android:layout_gravity="center"
android:minWidth="64dip"
android:minHeight="?attr/actionBarSize"
android:paddingLeft="12dip"
android:paddingRight="12dip">
<ImageButton android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -30,5 +34,8 @@
android:layout_gravity="center"
android:visibility="gone"
android:background="?attr/groupButtonBackground"
style="?attr/buttonStyleSmall" />
android:textAppearance="?attr/textAppearanceMedium"
style="?attr/buttonStyleSmall"
android:paddingLeft="4dip"
android:paddingRight="4dip" />
</com.android.internal.view.menu.ActionMenuItemView>

View File

@@ -1380,6 +1380,7 @@
</style>
<style name="Widget.Holo.Spinner" parent="Widget.Spinner.DropDown">
<item name="android:background">@android:drawable/spinner_background_holo_dark</item>
<item name="android:dropDownSelector">@android:drawable/list_selector_holo_dark</item>
<item name="android:popupBackground">@android:drawable/menu_dropdown_panel_holo_dark</item>
<item name="android:dropDownVerticalOffset">0dip</item>
@@ -1391,6 +1392,10 @@
<style name="Widget.Holo.Spinner.DropDown">
</style>
<style name="Widget.Holo.Spinner.DropDown.ActionBar">
<item name="android:background">@android:drawable/spinner_cab_background_holo_dark</item>
</style>
<style name="Widget.Holo.CompoundButton.Star" parent="Widget.CompoundButton.Star">
</style>
@@ -1454,10 +1459,10 @@
</style>
<style name="Widget.Holo.ActionButton" parent="Widget.ActionButton">
<item name="android:paddingLeft">16dip</item>
<item name="android:paddingRight">16dip</item>
<item name="android:minWidth">64dip</item>
<item name="android:paddingLeft">4dip</item>
<item name="android:paddingRight">4dip</item>
<item name="android:minHeight">56dip</item>
<item name="android:scaleType">center</item>
</style>
<style name="Widget.Holo.ActionButton.Overflow">
@@ -1631,7 +1636,8 @@
<style name="Widget.Holo.Light.HorizontalScrollView" parent="Widget.HorizontalScrollView">
</style>
<style name="Widget.Holo.Light.Spinner" parent="Widget.Spinner.DropDown">
<style name="Widget.Holo.Light.Spinner" parent="Widget.Holo.Spinner">
<item name="android:background">@android:drawable/spinner_background_holo_light</item>
<item name="android:dropDownSelector">@android:drawable/list_selector_holo_light</item>
<item name="android:popupBackground">@android:drawable/menu_dropdown_panel_holo_light</item>
<item name="android:dropDownVerticalOffset">0dip</item>
@@ -1643,6 +1649,10 @@
<style name="Widget.Holo.Light.Spinner.DropDown">
</style>
<style name="Widget.Holo.Light.Spinner.DropDown.ActionBar">
<item name="android:background">@android:drawable/spinner_cab_background_holo_light</item>
</style>
<style name="Widget.Holo.Light.CompoundButton.Star" parent="Widget.CompoundButton.Star">
</style>

View File

@@ -835,7 +835,7 @@
<item name="searchWidgetCorpusItemBackground">@android:color/search_widget_corpus_item_background</item>
<!-- Action bar styles -->
<item name="actionDropDownStyle">@android:style/Widget.Holo.Spinner.DropDown</item>
<item name="actionDropDownStyle">@android:style/Widget.Holo.Spinner.DropDown.ActionBar</item>
<item name="actionButtonStyle">@android:style/Widget.Holo.ActionButton</item>
<item name="actionOverflowButtonStyle">@android:style/Widget.Holo.ActionButton.Overflow</item>
<item name="actionModeBackground">@android:drawable/cab_holo_dark</item>
@@ -1064,17 +1064,17 @@
<item name="searchWidgetCorpusItemBackground">@android:color/search_widget_corpus_item_background</item>
<!-- Action bar styles -->
<item name="actionDropDownStyle">@android:style/Widget.Holo.Spinner.DropDown</item>
<item name="actionButtonStyle">@android:style/Widget.Holo.ActionButton</item>
<item name="actionOverflowButtonStyle">@android:style/Widget.Holo.ActionButton.Overflow</item>
<item name="actionDropDownStyle">@android:style/Widget.Holo.Light.Spinner.DropDown.ActionBar</item>
<item name="actionButtonStyle">@android:style/Widget.Holo.Light.ActionButton</item>
<item name="actionOverflowButtonStyle">@android:style/Widget.Holo.Light.ActionButton.Overflow</item>
<item name="actionModeBackground">@android:drawable/cab_holo_light</item>
<item name="actionModeCloseDrawable">@android:drawable/cab_ic_close_holo</item>
<item name="actionBarTabStyle">@style/Widget.Holo.ActionBarView_TabView</item>
<item name="actionBarTabBarStyle">@style/Widget.Holo.ActionBarView_TabBar</item>
<item name="actionBarTabTextStyle">@style/Widget.Holo.ActionBarView_TabText</item>
<item name="actionBarTabStyle">@style/Widget.Holo.Light.ActionBarView_TabView</item>
<item name="actionBarTabBarStyle">@style/Widget.Holo.Light.ActionBarView_TabBar</item>
<item name="actionBarTabTextStyle">@style/Widget.Holo.Light.ActionBarView_TabText</item>
<item name="actionModeStyle">@style/Widget.Holo.Light.ActionMode</item>
<item name="actionModeCloseButtonStyle">@style/Widget.Holo.ActionButton.CloseMode</item>
<item name="actionBarStyle">@android:style/Widget.Holo.ActionBar</item>
<item name="actionModeCloseButtonStyle">@style/Widget.Holo.Light.ActionButton.CloseMode</item>
<item name="actionBarStyle">@android:style/Widget.Holo.Light.ActionBar</item>
<item name="actionBarSize">56dip</item>
<item name="dividerVertical">@drawable/divider_vertical_holo_light</item>