diff options
author | Danny Baumann <dannybaumann@web.de> | 2013-04-07 13:33:43 +0200 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2013-04-18 11:36:44 +0200 |
commit | 0d81e44b5ca1d363ddfde32ad0d833e429e33af1 (patch) | |
tree | bf756289050ccc17e9809152ffac0279569f6028 /res/layout | |
parent | bdb1b7f1a1d2b1bc0c1ddcd22a3c2cc63b85a031 (diff) | |
download | packages_apps_settings-0d81e44b5ca1d363ddfde32ad0d833e429e33af1.zip packages_apps_settings-0d81e44b5ca1d363ddfde32ad0d833e429e33af1.tar.gz packages_apps_settings-0d81e44b5ca1d363ddfde32ad0d833e429e33af1.tar.bz2 |
Overhaul auto-brightness level UI.
This changes a few things:
- Don't imply a 'bucket' type of algorithm is used by showing an ambient
brightness range for each line
- Allow manually entering the screen brightness
- Add a preview window for the cubic spline interpolation
- Add a help text
JIRA:CYAN-612
Change-Id: I64274280872b9fe4f6fdc368d654aca81e0a4e0c
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/auto_brightness_help.xml | 27 | ||||
-rw-r--r-- | res/layout/auto_brightness_level_setup.xml (renamed from res/layout/auto_brightness_lux_config.xml) | 27 | ||||
-rw-r--r-- | res/layout/auto_brightness_preview.xml | 37 | ||||
-rw-r--r-- | res/layout/dialog_auto_brightness_levels.xml | 42 |
4 files changed, 115 insertions, 18 deletions
diff --git a/res/layout/auto_brightness_help.xml b/res/layout/auto_brightness_help.xml new file mode 100644 index 0000000..21daa92 --- /dev/null +++ b/res/layout/auto_brightness_help.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 The CyanogenMod 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. +--> + +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <TextView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="6dip" + android:text="@string/auto_brightness_help_text" /> + +</ScrollView> diff --git a/res/layout/auto_brightness_lux_config.xml b/res/layout/auto_brightness_level_setup.xml index 8d411bc..72d7e99 100644 --- a/res/layout/auto_brightness_lux_config.xml +++ b/res/layout/auto_brightness_level_setup.xml @@ -24,10 +24,10 @@ <TextView android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/auto_brightness_start_lux" /> + android:paddingTop="8dip" + android:text="@string/auto_brightness_lux" /> - <EditText android:id="@+id/start_lux" - android:enabled="false" + <EditText android:id="@+id/lux" android:singleLine="true" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -38,13 +38,24 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingTop="8dip" - android:text="@string/auto_brightness_end_lux" /> + android:text="@string/auto_brightness_backlight" /> - <EditText android:id="@+id/end_lux" - android:singleLine="true" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingTop="2dip" - android:numeric="integer" /> + android:paddingTop="2dip"> + + <SeekBar android:id="@+id/backlight" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="1" /> + + <EditText android:id="@+id/backlight_input" + android:singleLine="true" + android:layout_width="80dip" + android:layout_height="wrap_content" + android:numeric="decimal" /> + + </LinearLayout> </LinearLayout> diff --git a/res/layout/auto_brightness_preview.xml b/res/layout/auto_brightness_preview.xml new file mode 100644 index 0000000..d1a5fc1 --- /dev/null +++ b/res/layout/auto_brightness_preview.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 The CyanogenMod 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" + xmlns:settings="http://schemas.android.com/apk/res/com.android.settings" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:gravity="center" + android:padding="4dip"> + + <com.android.settings.cyanogenmod.CubicSplinePreviewView + android:id="@+id/brightness_preview" + android:layout_width="match_parent" + android:layout_height="match_parent" + settings:backgroundColor="@color/auto_brightness_preview_background" + settings:foregroundColor="@color/auto_brightness_preview_foreground" + settings:gridColor="@color/auto_brightness_preview_grid" + settings:markerColor="@color/auto_brightness_preview_markers" + settings:textSize="@dimen/auto_brightness_preview_text_size" + settings:strokeWidth="@dimen/auto_brightness_preview_stroke_width" + settings:markerSize="@dimen/auto_brightness_preview_marker_size" /> + +</LinearLayout> diff --git a/res/layout/dialog_auto_brightness_levels.xml b/res/layout/dialog_auto_brightness_levels.xml index a3f0afd..9e973e8 100644 --- a/res/layout/dialog_auto_brightness_levels.xml +++ b/res/layout/dialog_auto_brightness_levels.xml @@ -18,25 +18,47 @@ android:layout_width="match_parent" android:layout_height="match_parent" > - <TextView - android:id="@+id/light_sensor_value" + <LinearLayout + android:id="@+id/top_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" - android:padding="8dip" /> + android:orientation="vertical" + android:divider="?android:attr/dividerHorizontal" + android:showDividers="end" + android:dividerPadding="0dip"> - <TextView - android:id="@+id/current_brightness" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@id/light_sensor_value" - android:padding="8dip" /> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layoutDirection="locale"> + + <TextView + android:id="@+id/light_sensor_value" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_gravity="center_vertical" + android:padding="8dip" /> + + <ImageButton + android:id="@+id/more" + android:layout_width="@dimen/auto_brightness_dialog_more_button_size" + android:layout_height="@dimen/auto_brightness_dialog_more_button_size" + android:src="@*android:drawable/ic_menu_moreoverflow_holo_dark" + android:background="?android:attr/actionBarItemBackground" + android:contentDescription="@string/wifi_menu_more_options" /> + + </LinearLayout> + + </LinearLayout> <ListView android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_below="@id/light_sensor_value" + android:layout_below="@id/top_container" android:layout_alignParentBottom="true" /> </RelativeLayout> |