diff options
author | Ken Shirriff <kens@google.com> | 2009-07-01 11:18:38 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-07-01 11:18:38 -0700 |
commit | 22ce76eee05dda07121ec972e26658a5a423f880 (patch) | |
tree | cbc8209299e8dade0d652b7b98f6c90d1bf18476 /res | |
parent | 8cb8433fade30bb7303c5e69881cab37f988d856 (diff) | |
parent | 311356dd71eb33a383fb9a5b470517103ea1f424 (diff) | |
download | packages_apps_settings-22ce76eee05dda07121ec972e26658a5a423f880.zip packages_apps_settings-22ce76eee05dda07121ec972e26658a5a423f880.tar.gz packages_apps_settings-22ce76eee05dda07121ec972e26658a5a423f880.tar.bz2 |
am 311356dd: Redo power widget layout with the proper widget style.
Merge commit '311356dd71eb33a383fb9a5b470517103ea1f424'
* commit '311356dd71eb33a383fb9a5b470517103ea1f424':
Redo power widget layout with the proper widget style.
Diffstat (limited to 'res')
17 files changed, 114 insertions, 33 deletions
diff --git a/res/drawable-land/appwidget_bg.9.png b/res/drawable-land/appwidget_bg.9.png Binary files differnew file mode 100644 index 0000000..a289712 --- /dev/null +++ b/res/drawable-land/appwidget_bg.9.png diff --git a/res/drawable/appwidget_bg.9.png b/res/drawable/appwidget_bg.9.png Binary files differnew file mode 100644 index 0000000..7ace816 --- /dev/null +++ b/res/drawable/appwidget_bg.9.png diff --git a/res/drawable/widget_btn.xml b/res/drawable/appwidget_inner.xml index 720bc49..fc7bb6d 100644 --- a/res/drawable/widget_btn.xml +++ b/res/drawable/appwidget_inner.xml @@ -17,17 +17,17 @@ <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_window_focused="false" android:state_enabled="true" - android:drawable="@drawable/widget_btn_default" /> + android:drawable="@drawable/appwidget_inner_default" /> <item android:state_pressed="true" - android:drawable="@drawable/widget_btn_pressed" /> + android:drawable="@drawable/appwidget_inner_pressed" /> <item android:state_focused="true" android:state_enabled="true" - android:drawable="@drawable/widget_btn_selected" /> + android:drawable="@drawable/appwidget_inner_selected" /> <item android:state_enabled="true" - android:drawable="@drawable/widget_btn_default" /> + android:drawable="@drawable/appwidget_inner_default" /> <item - android:drawable="@drawable/widget_btn_default" /> + android:drawable="@drawable/appwidget_inner_default" /> </selector> diff --git a/res/drawable/appwidget_inner_default.9.png b/res/drawable/appwidget_inner_default.9.png Binary files differnew file mode 100644 index 0000000..2c37b89 --- /dev/null +++ b/res/drawable/appwidget_inner_default.9.png diff --git a/res/drawable/appwidget_inner_pressed.9.png b/res/drawable/appwidget_inner_pressed.9.png Binary files differnew file mode 100644 index 0000000..b23c3ae --- /dev/null +++ b/res/drawable/appwidget_inner_pressed.9.png diff --git a/res/drawable/appwidget_inner_selected.9.png b/res/drawable/appwidget_inner_selected.9.png Binary files differnew file mode 100644 index 0000000..474d717 --- /dev/null +++ b/res/drawable/appwidget_inner_selected.9.png diff --git a/res/drawable/appwidget_outer.xml b/res/drawable/appwidget_outer.xml new file mode 100644 index 0000000..d6f3cb6 --- /dev/null +++ b/res/drawable/appwidget_outer.xml @@ -0,0 +1,33 @@ +<?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. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_window_focused="false" android:state_enabled="true" + android:drawable="@drawable/appwidget_outer_default" /> + + <item android:state_pressed="true" + android:drawable="@drawable/appwidget_outer_pressed" /> + + <item android:state_focused="true" android:state_enabled="true" + android:drawable="@drawable/appwidget_outer_selected" /> + + <item android:state_enabled="true" + android:drawable="@drawable/appwidget_outer_default" /> + + <item + android:drawable="@drawable/appwidget_outer_default" /> +</selector> diff --git a/res/drawable/appwidget_outer_default.9.png b/res/drawable/appwidget_outer_default.9.png Binary files differnew file mode 100644 index 0000000..d84e56a --- /dev/null +++ b/res/drawable/appwidget_outer_default.9.png diff --git a/res/drawable/appwidget_outer_pressed.9.png b/res/drawable/appwidget_outer_pressed.9.png Binary files differnew file mode 100644 index 0000000..5348fef --- /dev/null +++ b/res/drawable/appwidget_outer_pressed.9.png diff --git a/res/drawable/appwidget_outer_selected.9.png b/res/drawable/appwidget_outer_selected.9.png Binary files differnew file mode 100644 index 0000000..c6d5df7 --- /dev/null +++ b/res/drawable/appwidget_outer_selected.9.png diff --git a/res/drawable/widget_bg.9.png b/res/drawable/widget_bg.9.png Binary files differdeleted file mode 100644 index a2007ad..0000000 --- a/res/drawable/widget_bg.9.png +++ /dev/null diff --git a/res/drawable/widget_btn_default.9.png b/res/drawable/widget_btn_default.9.png Binary files differdeleted file mode 100644 index 3908327..0000000 --- a/res/drawable/widget_btn_default.9.png +++ /dev/null diff --git a/res/drawable/widget_btn_pressed.9.png b/res/drawable/widget_btn_pressed.9.png Binary files differdeleted file mode 100644 index 112a8eb..0000000 --- a/res/drawable/widget_btn_pressed.9.png +++ /dev/null diff --git a/res/drawable/widget_btn_selected.9.png b/res/drawable/widget_btn_selected.9.png Binary files differdeleted file mode 100644 index fb25235..0000000 --- a/res/drawable/widget_btn_selected.9.png +++ /dev/null diff --git a/res/layout-land/widget.xml b/res/layout-land/widget.xml new file mode 100644 index 0000000..1e7fb5f --- /dev/null +++ b/res/layout-land/widget.xml @@ -0,0 +1,63 @@ +<?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. +--> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/main" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:background="@drawable/appwidget_bg" > + + <ImageButton + android:id="@+id/btn_wifi" + android:layout_width="79dip" + android:layout_height="fill_parent" + android:background="@drawable/appwidget_outer" + android:layout_gravity="center_horizontal" + /> + + <ImageButton + android:id="@+id/btn_bluetooth" + android:layout_width="79dip" + android:layout_height="fill_parent" + android:background="@drawable/appwidget_inner" + android:layout_gravity="center_horizontal" + /> + + <ImageButton + android:id="@+id/btn_gps" + android:layout_width="79dip" + android:layout_height="fill_parent" + android:background="@drawable/appwidget_inner" + android:layout_gravity="center_horizontal" + /> + + <ImageButton + android:id="@+id/btn_sync" + android:layout_width="79dip" + android:layout_height="fill_parent" + android:background="@drawable/appwidget_inner" + android:layout_gravity="center_horizontal" + /> + + <ImageButton + android:id="@+id/btn_brightness" + android:layout_width="78dip" + android:layout_height="fill_parent" + android:background="@drawable/appwidget_inner" + android:layout_gravity="center_horizontal" + /> + + </LinearLayout> diff --git a/res/layout/widget.xml b/res/layout/widget.xml index dea290e..3a223b6 100644 --- a/res/layout/widget.xml +++ b/res/layout/widget.xml @@ -16,62 +16,47 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/main" - android:layout_width="wrap_content" + android:layout_width="fill_parent" android:layout_height="wrap_content" - android:orientation="horizontal" - android:paddingLeft="4dip" - android:paddingRight="4dip" - android:paddingTop="7dip" - android:paddingBottom="13dip" - android:background="@drawable/widget_bg" > + android:background="@drawable/appwidget_bg" > <ImageButton android:id="@+id/btn_wifi" - android:layout_width="wrap_content" + android:layout_width="57dip" android:layout_height="fill_parent" - android:layout_marginLeft="3dip" - android:layout_marginRight="3dip" - android:background="@drawable/widget_btn" + android:background="@drawable/appwidget_outer" android:layout_gravity="center_horizontal" /> <ImageButton android:id="@+id/btn_bluetooth" - android:layout_width="wrap_content" + android:layout_width="57dip" android:layout_height="fill_parent" - android:layout_marginLeft="3dip" - android:layout_marginRight="3dip" - android:background="@drawable/widget_btn" + android:background="@drawable/appwidget_inner" android:layout_gravity="center_horizontal" /> <ImageButton android:id="@+id/btn_gps" - android:layout_width="wrap_content" + android:layout_width="57dip" android:layout_height="fill_parent" - android:layout_marginLeft="3dip" - android:layout_marginRight="3dip" - android:background="@drawable/widget_btn" + android:background="@drawable/appwidget_inner" android:layout_gravity="center_horizontal" /> <ImageButton android:id="@+id/btn_sync" - android:layout_width="wrap_content" + android:layout_width="57dip" android:layout_height="fill_parent" - android:layout_marginLeft="3dip" - android:layout_marginRight="3dip" - android:background="@drawable/widget_btn" + android:background="@drawable/appwidget_inner" android:layout_gravity="center_horizontal" /> <ImageButton android:id="@+id/btn_brightness" - android:layout_width="wrap_content" + android:layout_width="58dip" android:layout_height="fill_parent" - android:layout_marginLeft="3dip" - android:layout_marginRight="3dip" - android:background="@drawable/widget_btn" + android:background="@drawable/appwidget_inner" android:layout_gravity="center_horizontal" /> diff --git a/res/xml/appwidget_info.xml b/res/xml/appwidget_info.xml index 02a1dfd..2186dab 100644 --- a/res/xml/appwidget_info.xml +++ b/res/xml/appwidget_info.xml @@ -15,7 +15,7 @@ --> <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" - android:minWidth="219dip" + android:minWidth="294dip" android:minHeight="72dip" android:initialLayout="@layout/widget" > |