diff options
author | Gilles Debunne <debunne@google.com> | 2010-12-22 10:07:15 -0800 |
---|---|---|
committer | Gilles Debunne <debunne@google.com> | 2011-01-04 09:21:22 -0800 |
commit | da0a3f03a1eef3fd93266d00aa94f2e1a4f65236 (patch) | |
tree | 9931995ff283ffe882f5556026ddf09630ef6c96 /core/res | |
parent | b2316968cfb96148ebcff268afd32f98150a8869 (diff) | |
download | frameworks_base-da0a3f03a1eef3fd93266d00aa94f2e1a4f65236.zip frameworks_base-da0a3f03a1eef3fd93266d00aa94f2e1a4f65236.tar.gz frameworks_base-da0a3f03a1eef3fd93266d00aa94f2e1a4f65236.tar.bz2 |
Multi-line EditText background is set using a state. Step 2.
See change 86347 for Step 1.
New state_multiline state flag, handled in TextView drawable background drawables.
Change-Id: I230df16c7ddee3296da180fd80ef341a4ac17dc0
Diffstat (limited to 'core/res')
-rw-r--r-- | core/res/res/drawable/edit_text_holo_dark.xml | 11 | ||||
-rw-r--r-- | core/res/res/drawable/edit_text_holo_light.xml | 9 | ||||
-rw-r--r-- | core/res/res/drawable/edit_text_multiline_holo_dark.xml | 25 | ||||
-rw-r--r-- | core/res/res/drawable/edit_text_multiline_holo_light.xml | 25 | ||||
-rwxr-xr-x | core/res/res/values/attrs.xml | 4 | ||||
-rw-r--r-- | core/res/res/values/public.xml | 1 |
6 files changed, 24 insertions, 51 deletions
diff --git a/core/res/res/drawable/edit_text_holo_dark.xml b/core/res/res/drawable/edit_text_holo_dark.xml index 29a5150..d00747f 100644 --- a/core/res/res/drawable/edit_text_holo_dark.xml +++ b/core/res/res/drawable/edit_text_holo_dark.xml @@ -15,10 +15,19 @@ --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_multiline="true" android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/textfield_multiline_default_holo_dark" /> + <item android:state_multiline="true" android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/textfield_multiline_disabled_holo_dark" /> + <item android:state_multiline="true" android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/textfield_multiline_activated_holo_dark" /> + <item android:state_multiline="true" android:state_enabled="true" android:state_activated="true" android:drawable="@drawable/textfield_multiline_focused_holo_dark" /> + <item android:state_multiline="true" android:state_enabled="true" android:drawable="@drawable/textfield_multiline_default_holo_dark" /> + <item android:state_multiline="true" android:state_focused="true" android:drawable="@drawable/textfield_multiline_disabled_focused_holo_dark" /> + <item android:state_multiline="true" android:drawable="@drawable/textfield_multiline_disabled_holo_dark" /> + <item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/textfield_default_holo_dark" /> <item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/textfield_disabled_holo_dark" /> <item android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/textfield_activated_holo_dark" /> - <item android:state_enabled="true" android:state_activated="true" android:drawable="@drawable/textfield_focused_holo_dark" /> + <iten android:state_enabled="true" android:state_activated="true" android:drawable="@drawable/textfield_focused_holo_dark" /> <item android:state_enabled="true" android:drawable="@drawable/textfield_default_holo_dark" /> <item android:state_focused="true" android:drawable="@drawable/textfield_disabled_focused_holo_dark" /> <item android:drawable="@drawable/textfield_disabled_holo_dark" /> diff --git a/core/res/res/drawable/edit_text_holo_light.xml b/core/res/res/drawable/edit_text_holo_light.xml index 5426916..5bdcbd9 100644 --- a/core/res/res/drawable/edit_text_holo_light.xml +++ b/core/res/res/drawable/edit_text_holo_light.xml @@ -15,6 +15,15 @@ --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_multiline="true" android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/textfield_multiline_default_holo_light" /> + <item android:state_multiline="true" android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/textfield_multiline_disabled_holo_light" /> + <item android:state_multiline="true" android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/textfield_multiline_activated_holo_light" /> + <item android:state_multiline="true" android:state_enabled="true" android:state_activated="true" android:drawable="@drawable/textfield_multiline_focused_holo_light" /> + <item android:state_multiline="true" android:state_enabled="true" android:drawable="@drawable/textfield_multiline_default_holo_light" /> + <item android:state_multiline="true" android:state_focused="true" android:drawable="@drawable/textfield_multiline_disabled_focused_holo_light" /> + <item android:state_multiline="true" android:drawable="@drawable/textfield_multiline_disabled_holo_light" /> + <item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/textfield_default_holo_light" /> <item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/textfield_disabled_holo_light" /> <item android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/textfield_activated_holo_light" /> diff --git a/core/res/res/drawable/edit_text_multiline_holo_dark.xml b/core/res/res/drawable/edit_text_multiline_holo_dark.xml deleted file mode 100644 index d20ea19..0000000 --- a/core/res/res/drawable/edit_text_multiline_holo_dark.xml +++ /dev/null @@ -1,25 +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. ---> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/textfield_multiline_default_holo_dark" /> - <item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/textfield_multiline_disabled_holo_dark" /> - <item android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/textfield_multiline_activated_holo_dark" /> - <item android:state_enabled="true" android:state_activated="true" android:drawable="@drawable/textfield_multiline_focused_holo_dark" /> - <item android:state_enabled="true" android:drawable="@drawable/textfield_multiline_default_holo_dark" /> - <item android:state_focused="true" android:drawable="@drawable/textfield_multiline_disabled_focused_holo_dark" /> - <item android:drawable="@drawable/textfield_multiline_disabled_holo_dark" /> -</selector> diff --git a/core/res/res/drawable/edit_text_multiline_holo_light.xml b/core/res/res/drawable/edit_text_multiline_holo_light.xml deleted file mode 100644 index 41a4eab..0000000 --- a/core/res/res/drawable/edit_text_multiline_holo_light.xml +++ /dev/null @@ -1,25 +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. ---> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/textfield_multiline_default_holo_light" /> - <item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/textfield_multiline_disabled_holo_light" /> - <item android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/textfield_multiline_activated_holo_light" /> - <item android:state_enabled="true" android:state_activated="true" android:drawable="@drawable/textfield_multiline_focused_holo_light" /> - <item android:state_enabled="true" android:drawable="@drawable/textfield_multiline_default_holo_light" /> - <item android:state_focused="true" android:drawable="@drawable/textfield_multiline_disabled_focused_holo_light" /> - <item android:drawable="@drawable/textfield_multiline_disabled_holo_light" /> -</selector> diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 8333157..588b33b 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -3692,6 +3692,10 @@ <!-- State identifier indicating the popup will be above the anchor. --> <attr name="state_above_anchor" format="boolean" /> </declare-styleable> + <declare-styleable name="TextViewMultiLineBackgroundState"> + <!-- State identifier indicating a TextView has a multi-line layout. --> + <attr name="state_multiline" format="boolean" /> + </declare-styleable> <!-- ***************************************************************** --> <!-- Support for Searchable activities. --> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 9f1b9a1..76a9d3b 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -1425,6 +1425,7 @@ <public type="attr" name="solidColor" /> <public type="attr" name="spinnersShown" /> <public type="attr" name="calendarViewShown" /> + <public type="attr" name="state_multiline" /> <public type="anim" name="animator_fade_in" /> <public type="anim" name="animator_fade_out" /> |