Files
app_Settings/res/layout/widget.xml
Ken Shirriff 03a6110b4f 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.
2009-06-08 13:57:26 -07:00

77 lines
2.7 KiB
XML

<?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>