summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorDan Murphy <D.Murphy@motorola.com>2009-08-27 15:05:23 -0500
committerMike Lockwood <lockwood@android.com>2009-09-14 21:42:56 -0400
commita096888f3c7e14723168c323f0ffdb2473adf5d3 (patch)
treef45604c84dd84f3774d2211f35c595c1570ec028 /res/layout
parenta3aaf19e09806f7e56c59621fc6c17e4429b2e6d (diff)
downloadpackages_apps_settings-a096888f3c7e14723168c323f0ffdb2473adf5d3.zip
packages_apps_settings-a096888f3c7e14723168c323f0ffdb2473adf5d3.tar.gz
packages_apps_settings-a096888f3c7e14723168c323f0ffdb2473adf5d3.tar.bz2
apps/settings: Add auto/manual brightness control to Brightness settings
Add changes to have the ability to turn on and off the automatic light sensing for the device. This is fully configurable and is by default not present. Vendors should override the ALS setting to enable the automatic lighting controls. These changes will add a check box to the Brightness settings menu to give control to the user to allow the device's display lighting to be controlled via the slide bar or the auto lighting system. If the user selects auto then the slide bar will become invisible. Manual mode will present the slide bar to the user. Change-Id: I512c9d5dd72ddd831b33eb8fcd4680e2fc7f786e Signed-off-by: Dan Murphy <D.Murphy@motorola.com> Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/preference_dialog_brightness.xml50
1 files changed, 50 insertions, 0 deletions
diff --git a/res/layout/preference_dialog_brightness.xml b/res/layout/preference_dialog_brightness.xml
new file mode 100644
index 0000000..071beed
--- /dev/null
+++ b/res/layout/preference_dialog_brightness.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+
+ Copyright (C) 2009 Motorola, Inc.
+ March 23, 2009 - Motorola - Allow automatic brightness changes.
+-->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical"
+ android:gravity="center_horizontal"
+ android:paddingBottom="20dip">
+
+ <ImageView android:id="@android:id/icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="20dip" />
+
+ <CheckBox android:id="@+id/automatic_mode"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/automatic_brightness"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:layout_marginTop="6dip"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip" />
+
+ <SeekBar android:id="@*android:id/seekbar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="20dip" />
+
+ </LinearLayout>
+</ScrollView>