summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-12-03 14:46:23 -0800
committerDianne Hackborn <hackbod@google.com>2010-12-03 16:32:50 -0800
commit8c7a580b34d67fefd5f777c7bd6247b2d3960608 (patch)
tree0d4c48ccc8c813f8202193c799b5fdb2bc6d3e16
parent988f382308f4d6c743a3d85462184ed077c3a36e (diff)
downloadframeworks_base-8c7a580b34d67fefd5f777c7bd6247b2d3960608.zip
frameworks_base-8c7a580b34d67fefd5f777c7bd6247b2d3960608.tar.gz
frameworks_base-8c7a580b34d67fefd5f777c7bd6247b2d3960608.tar.bz2
Some theme cleanup.
- Add new dialog themes without a title bar. - Add new Theme.Holo.NoActionBar.DialogWhenLarge. - Remove old Extended and Theme.Light.Holo themes. - Reorder the public definitions to keep things nice. Also @hide the MipmapDrawable class. Change-Id: Ic69a56e9b28aacf441780633f37f0bc6a475d08a
-rw-r--r--api/current.xml124
-rw-r--r--core/res/res/values-large/themes.xml12
-rw-r--r--core/res/res/values/public.xml31
-rw-r--r--core/res/res/values/themes.xml37
-rw-r--r--core/res/res/values/themes_extended.xml35
-rw-r--r--graphics/java/android/graphics/drawable/Drawable.java2
-rw-r--r--graphics/java/android/graphics/drawable/MipmapDrawable.java3
7 files changed, 107 insertions, 137 deletions
diff --git a/api/current.xml b/api/current.xml
index 1687d5a..accd287 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -14688,7 +14688,7 @@
type="int"
transient="false"
volatile="false"
- value="16973951"
+ value="16973949"
static="true"
final="true"
deprecated="not deprecated"
@@ -14699,7 +14699,7 @@
type="int"
transient="false"
volatile="false"
- value="16973952"
+ value="16973950"
static="true"
final="true"
deprecated="not deprecated"
@@ -14820,7 +14820,7 @@
type="int"
transient="false"
volatile="false"
- value="16973932"
+ value="16973930"
static="true"
final="true"
deprecated="not deprecated"
@@ -14831,7 +14831,7 @@
type="int"
transient="false"
volatile="false"
- value="16973934"
+ value="16973932"
static="true"
final="true"
deprecated="not deprecated"
@@ -14842,7 +14842,7 @@
type="int"
transient="false"
volatile="false"
- value="16973941"
+ value="16973937"
static="true"
final="true"
deprecated="not deprecated"
@@ -14853,183 +14853,183 @@
type="int"
transient="false"
volatile="false"
- value="16973954"
+ value="16973943"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Holo_Dialog_Alert"
+<field name="Theme_Holo_DialogWhenLarge_NoActionBar"
type="int"
transient="false"
volatile="false"
- value="16973945"
+ value="16973944"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Holo_Extended"
+<field name="Theme_Holo_Dialog_Alert"
type="int"
transient="false"
volatile="false"
- value="16973943"
+ value="16973941"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Holo_Light"
+<field name="Theme_Holo_Dialog_NoActionBar"
type="int"
transient="false"
volatile="false"
- value="16973940"
+ value="16973938"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Holo_Light_Dialog"
+<field name="Theme_Holo_Light"
type="int"
transient="false"
volatile="false"
- value="16973942"
+ value="16973936"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Holo_Light_DialogWhenLarge"
+<field name="Theme_Holo_Light_Dialog"
type="int"
transient="false"
volatile="false"
- value="16973955"
+ value="16973939"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Holo_Light_Dialog_Alert"
+<field name="Theme_Holo_Light_DialogWhenLarge"
type="int"
transient="false"
volatile="false"
- value="16973946"
+ value="16973945"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Holo_Light_Extended"
+<field name="Theme_Holo_Light_DialogWhenLarge_NoActionBar"
type="int"
transient="false"
volatile="false"
- value="16973944"
+ value="16973946"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Holo_NoActionBar"
+<field name="Theme_Holo_Light_Dialog_Alert"
type="int"
transient="false"
volatile="false"
- value="16973936"
+ value="16973942"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Holo_NoActionBar_Fullscreen"
+<field name="Theme_Holo_Light_Dialog_NoActionBar"
type="int"
transient="false"
volatile="false"
- value="16973937"
+ value="16973940"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Holo_Wallpaper"
+<field name="Theme_Holo_NoActionBar"
type="int"
transient="false"
volatile="false"
- value="16973956"
+ value="16973934"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Holo_Wallpaper_NoTitleBar"
+<field name="Theme_Holo_NoActionBar_Fullscreen"
type="int"
transient="false"
volatile="false"
- value="16973957"
+ value="16973935"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_InputMethod"
+<field name="Theme_Holo_Wallpaper"
type="int"
transient="false"
volatile="false"
- value="16973908"
+ value="16973947"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Light"
+<field name="Theme_Holo_Wallpaper_NoTitleBar"
type="int"
transient="false"
volatile="false"
- value="16973836"
+ value="16973948"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Light_Holo"
+<field name="Theme_InputMethod"
type="int"
transient="false"
volatile="false"
- value="16973935"
+ value="16973908"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Light_Holo_NoActionBar"
+<field name="Theme_Light"
type="int"
transient="false"
volatile="false"
- value="16973938"
+ value="16973836"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
-<field name="Theme_Light_Holo_NoActionBar_Fullscreen"
+<field name="Theme_Light_Holo"
type="int"
transient="false"
volatile="false"
- value="16973939"
+ value="16973933"
static="true"
final="true"
deprecated="not deprecated"
@@ -15117,7 +15117,7 @@
type="int"
transient="false"
volatile="false"
- value="16973933"
+ value="16973931"
static="true"
final="true"
deprecated="not deprecated"
@@ -15249,7 +15249,7 @@
type="int"
transient="false"
volatile="false"
- value="16973958"
+ value="16973951"
static="true"
final="true"
deprecated="not deprecated"
@@ -15260,7 +15260,7 @@
type="int"
transient="false"
volatile="false"
- value="16973931"
+ value="16973953"
static="true"
final="true"
deprecated="not deprecated"
@@ -15271,7 +15271,7 @@
type="int"
transient="false"
volatile="false"
- value="16973950"
+ value="16973957"
static="true"
final="true"
deprecated="not deprecated"
@@ -15282,7 +15282,7 @@
type="int"
transient="false"
volatile="false"
- value="16973949"
+ value="16973956"
static="true"
final="true"
deprecated="not deprecated"
@@ -15436,7 +15436,7 @@
type="int"
transient="false"
volatile="false"
- value="16973953"
+ value="16973958"
static="true"
final="true"
deprecated="not deprecated"
@@ -16481,7 +16481,7 @@
type="int"
transient="false"
volatile="false"
- value="16973947"
+ value="16973954"
static="true"
final="true"
deprecated="not deprecated"
@@ -16536,7 +16536,7 @@
type="int"
transient="false"
volatile="false"
- value="16973948"
+ value="16973955"
static="true"
final="true"
deprecated="not deprecated"
@@ -16679,7 +16679,7 @@
type="int"
transient="false"
volatile="false"
- value="16973930"
+ value="16973952"
static="true"
final="true"
deprecated="not deprecated"
@@ -87869,36 +87869,6 @@
</parameter>
</method>
</class>
-<class name="MipmapDrawable"
- extends="android.graphics.drawable.DrawableContainer"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<constructor name="MipmapDrawable"
- type="android.graphics.drawable.MipmapDrawable"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</constructor>
-<method name="addDrawable"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="drawable" type="android.graphics.drawable.Drawable">
-</parameter>
-</method>
-</class>
<class name="NinePatchDrawable"
extends="android.graphics.drawable.Drawable"
abstract="false"
diff --git a/core/res/res/values-large/themes.xml b/core/res/res/values-large/themes.xml
index 8f9b03d..12257a1 100644
--- a/core/res/res/values-large/themes.xml
+++ b/core/res/res/values-large/themes.xml
@@ -17,8 +17,16 @@
*/
-->
<resources>
- <style name="Theme.Holo.DialogWhenLarge" parent="@android:style/Theme.Holo.Dialog">
+ <style name="Theme.Holo.DialogWhenLarge"
+ parent="@android:style/Theme.Holo.Dialog">
</style>
- <style name="Theme.Holo.Light.DialogWhenLarge" parent="@android:style/Theme.Holo.Light.Dialog">
+ <style name="Theme.Holo.DialogWhenLarge.NoActionBar"
+ parent="@android:style/Theme.Holo.Dialog.NoActionBar">
+ </style>
+ <style name="Theme.Holo.Light.DialogWhenLarge"
+ parent="@android:style/Theme.Holo.Light.Dialog">
+ </style>
+ <style name="Theme.Holo.Light.DialogWhenLarge.NoActionBar"
+ parent="@android:style/Theme.Holo.Light.Dialog.NoActionBar">
</style>
</resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 3fac653..510797e 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1436,8 +1436,6 @@
<public type="layout" name="simple_list_item_activated_2" />
<public type="style" name="Theme.WithActionBar" />
- <public type="style" name="Widget.Spinner.DropDown" />
- <public type="style" name="Widget.ActionButton" />
<public type="style" name="Theme.Dialog.NoFrame" />
<public type="style" name="Theme.NoTitleBar.OverlayActionModes" />
@@ -1445,32 +1443,31 @@
<public type="style" name="Theme.Light.Holo" />
<public type="style" name="Theme.Holo.NoActionBar" />
<public type="style" name="Theme.Holo.NoActionBar.Fullscreen" />
- <public type="style" name="Theme.Light.Holo.NoActionBar" />
- <public type="style" name="Theme.Light.Holo.NoActionBar.Fullscreen" />
<public type="style" name="Theme.Holo.Light" />
<public type="style" name="Theme.Holo.Dialog" />
+ <public type="style" name="Theme.Holo.Dialog.NoActionBar" />
<public type="style" name="Theme.Holo.Light.Dialog" />
- <public type="style" name="Theme.Holo.Extended" />
- <public type="style" name="Theme.Holo.Light.Extended" />
+ <public type="style" name="Theme.Holo.Light.Dialog.NoActionBar" />
<public type="style" name="Theme.Holo.Dialog.Alert" />
<public type="style" name="Theme.Holo.Light.Dialog.Alert" />
-
- <public type="style" name="Widget.ListPopupWindow" />
- <public type="style" name="Widget.PopupMenu" />
- <public type="style" name="Widget.ActionButton.Overflow" />
- <public type="style" name="Widget.ActionButton.CloseMode" />
- <public type="style" name="TextAppearance.Widget.PopupMenu.Large" />
- <public type="style" name="TextAppearance.Widget.PopupMenu.Small" />
- <public type="style" name="Widget.FragmentBreadCrumbs" />
-
<public type="style" name="Theme.Holo.DialogWhenLarge" />
+ <public type="style" name="Theme.Holo.DialogWhenLarge.NoActionBar" />
<public type="style" name="Theme.Holo.Light.DialogWhenLarge" />
-
+ <public type="style" name="Theme.Holo.Light.DialogWhenLarge.NoActionBar" />
<public type="style" name="Theme.Holo.Wallpaper" />
<public type="style" name="Theme.Holo.Wallpaper.NoTitleBar" />
- <public type="style" name="Widget.ActionBar" />
+ <public type="style" name="TextAppearance.Widget.PopupMenu.Large" />
+ <public type="style" name="TextAppearance.Widget.PopupMenu.Small" />
+ <public type="style" name="Widget.ActionBar" />
+ <public type="style" name="Widget.Spinner.DropDown" />
+ <public type="style" name="Widget.ActionButton" />
+ <public type="style" name="Widget.ListPopupWindow" />
+ <public type="style" name="Widget.PopupMenu" />
+ <public type="style" name="Widget.ActionButton.Overflow" />
+ <public type="style" name="Widget.ActionButton.CloseMode" />
+ <public type="style" name="Widget.FragmentBreadCrumbs" />
<public type="style" name="Widget.Holo" />
<public type="style" name="Widget.Holo.Button" />
<public type="style" name="Widget.Holo.Button.Small" />
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 380d63b..263f4ce 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -1177,15 +1177,15 @@
<item name="android:windowContentOverlay">@null</item>
</style>
- <!-- Variant of the holographic light theme with no action bar -->
- <style name="Theme.Light.Holo.NoActionBar">
+ <!-- Variant of the holographic (light) theme with no action bar. -->
+ <style name="Theme.Holo.Light.NoActionBar">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
</style>
- <!-- Variant of the holographic light theme that has no title bar and fills
+ <!-- Variant of the holographic (light) theme that has no title bar and fills
the entire screen -->
- <style name="Theme.Light.Holo.NoActionBar.Fullscreen">
+ <style name="Theme.Holo.Light.NoActionBar.Fullscreen">
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
@@ -1218,6 +1218,12 @@
<item name="textAppearanceInverse">@android:style/TextAppearance.Holo.Inverse</item>
</style>
+ <!-- Variation of Theme.Holo.Dialog that does not include a title bar. -->
+ <style name="Theme.Holo.Dialog.NoActionBar">
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+ </style>
+
<!-- Variation of Theme.Holo.Dialog that does not include a frame (or background).
The view hierarchy of the dialog is responsible for drawing all of
its pixels. -->
@@ -1244,9 +1250,15 @@
<!-- Theme for a window that will be displayed either full-screen on
smaller screens (small, normal) or as a dialog on larger screens
- (large, xlarge) -->
+ (large, xlarge). -->
<style name="Theme.Holo.DialogWhenLarge" parent="@android:style/Theme.Holo">
</style>
+
+ <!-- Theme for a window without a title bar that will be displayed either
+ full-screen on smaller screens (small, normal) or as a dialog on larger screens
+ (large, xlarge). -->
+ <style name="Theme.Holo.DialogWhenLarge.NoActionBar" parent="@android:style/Theme.Holo.NoActionBar">
+ </style>
<!-- Light holo dialog themes -->
@@ -1275,12 +1287,25 @@
<item name="textAppearanceInverse">@android:style/TextAppearance.Holo.Light.Inverse</item>
</style>
+ <!-- Variation of Theme.Holo.Light.Dialog that does not include a title bar. -->
+ <style name="Theme.Holo.Light.Dialog.NoActionBar">
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+ </style>
+
<!-- Theme for a window that will be displayed either full-screen on
smaller screens (small, normal) or as a dialog on larger screens
- (large, xlarge) -->
+ (large, xlarge). -->
<style name="Theme.Holo.Light.DialogWhenLarge" parent="@android:style/Theme.Holo.Light">
</style>
+ <!-- Theme for a window without an action bar that will be displayed either full-screen
+ on smaller screens (small, normal) or as a dialog on larger screens
+ (large, xlarge). -->
+ <style name="Theme.Holo.Light.DialogWhenLarge.NoActionBar"
+ parent="@android:style/Theme.Holo.Light.NoActionBar">
+ </style>
+
<!-- Holo light theme for alert dialog windows, which is used by the
{@link android.app.AlertDialog} class. This is basically a dialog
but sets the background to empty so it can do two-tone backgrounds.
diff --git a/core/res/res/values/themes_extended.xml b/core/res/res/values/themes_extended.xml
deleted file mode 100644
index 064e935..0000000
--- a/core/res/res/values/themes_extended.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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.
--->
-
-<!--
- This theme file includes empty stubs for the "Extended" themes. These
- by default are identical to their parent themes. Device overlays in
- the build tree should include an overlay for this file with appropriate
- enhancements for the device. Those defining the device-specific overlay can
- assume that any activity using an extended theme is also requesting
- hardware acceleration.
--->
-<resources>
- <!-- Variant of the holographic dark theme that includes extra decorations
- appropriate for when hardware acceleration is in use. -->
- <style name="Theme.Holo.Extended">
- </style>
-
- <!-- Variant of the holographic light theme that includes extra decorations
- appropriate for when hardware acceleration is in use. -->
- <style name="Theme.Holo.Light.Extended">
- </style>
-</resources>
diff --git a/graphics/java/android/graphics/drawable/Drawable.java b/graphics/java/android/graphics/drawable/Drawable.java
index 2f13bef..6cdafdb 100644
--- a/graphics/java/android/graphics/drawable/Drawable.java
+++ b/graphics/java/android/graphics/drawable/Drawable.java
@@ -770,8 +770,10 @@ public abstract class Drawable {
drawable = new StateListDrawable();
} else if (name.equals("level-list")) {
drawable = new LevelListDrawable();
+ /* Probably not doing this.
} else if (name.equals("mipmap")) {
drawable = new MipmapDrawable();
+ */
} else if (name.equals("layer-list")) {
drawable = new LayerDrawable();
} else if (name.equals("transition")) {
diff --git a/graphics/java/android/graphics/drawable/MipmapDrawable.java b/graphics/java/android/graphics/drawable/MipmapDrawable.java
index 75fdeed..cd39719 100644
--- a/graphics/java/android/graphics/drawable/MipmapDrawable.java
+++ b/graphics/java/android/graphics/drawable/MipmapDrawable.java
@@ -27,6 +27,9 @@ import android.util.AttributeSet;
import java.io.IOException;
/**
+ * @hide -- we are probably moving to do MipMaps in another way (more integrated
+ * with the resource system).
+ *
* A resource that manages a number of alternate Drawables, and which actually draws the one which
* size matches the most closely the drawing bounds. Providing several pre-scaled version of the
* drawable helps minimizing the aliasing artifacts that can be introduced by the scaling.