summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorKen Shirriff <kens@google.com>2009-06-08 13:49:05 -0700
committerKen Shirriff <kens@google.com>2009-06-08 13:57:26 -0700
commit03a6110b4f62e72592b451c05848cfaad8c65324 (patch)
tree3559c29c7d08000dcc6eb40423dc1e36ec238927 /res/layout
parent5ed2c4ad43f2c3c85a025da04becd2eaa75927a1 (diff)
downloadpackages_apps_Settings-03a6110b4f62e72592b451c05848cfaad8c65324.zip
packages_apps_Settings-03a6110b4f62e72592b451c05848cfaad8c65324.tar.gz
packages_apps_Settings-03a6110b4f62e72592b451c05848cfaad8c65324.tar.bz2
Implement the power-control widget.
This widget allows uses to turn on/off bluetooth, wifi, gps, and sync, and adjust brightness without going through the settings menu. The widget provider updates the settings when the buttons are pressed. The widget provider is also a receiver for events indicating that the status was updated elsewhere and the buttons need to be changed.
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/widget.xml76
1 files changed, 76 insertions, 0 deletions
diff --git a/res/layout/widget.xml b/res/layout/widget.xml
new file mode 100644
index 0000000..63ce5a5
--- /dev/null
+++ b/res/layout/widget.xml
@@ -0,0 +1,76 @@
+<?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="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:paddingLeft="12dip"
+ android:paddingRight="12dip"
+ android:paddingTop="7dip"
+ android:paddingBottom="13dip"
+ android:background="@drawable/widget_bg" >
+
+ <ImageButton
+ android:id="@+id/btn_wifi"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_marginLeft="8dip"
+ android:background="@drawable/widget_btn"
+ android:layout_gravity="center_horizontal"
+ />
+
+ <ImageButton
+ android:id="@+id/btn_brightness"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_marginLeft="8dip"
+ android:background="@drawable/widget_btn"
+ android:layout_gravity="center_horizontal"
+
+ />
+
+ <ImageButton
+ android:id="@+id/btn_sync"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_marginLeft="8dip"
+ android:background="@drawable/widget_btn"
+ android:layout_gravity="center_horizontal"
+
+ />
+
+ <ImageButton
+ android:id="@+id/btn_gps"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_marginLeft="8dip"
+ android:background="@drawable/widget_btn"
+ android:layout_gravity="center_horizontal"
+
+ />
+
+ <ImageButton
+ android:id="@+id/btn_bluetooth"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_marginLeft="8dip"
+ android:background="@drawable/widget_btn"
+ android:layout_gravity="center_horizontal"
+
+ />
+ </LinearLayout>