diff options
author | Roman Birg <roman@cyngn.com> | 2016-01-19 16:38:02 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-01-25 14:19:19 -0800 |
commit | 1a99a4a44b776b033643197ac1bfa953875e517d (patch) | |
tree | dd46a30cf04cc1d98812e6d1bdd5b58e2846ce87 /packages/SystemUI/res | |
parent | 5a3c86f96b9f317993fefe8f1f68c155b5651d45 (diff) | |
download | frameworks_base-1a99a4a44b776b033643197ac1bfa953875e517d.zip frameworks_base-1a99a4a44b776b033643197ac1bfa953875e517d.tar.gz frameworks_base-1a99a4a44b776b033643197ac1bfa953875e517d.tar.bz2 |
SystemUI: handle when brightness slider is hidden
With this patch, the quick settings area should automatically expand and
make room for the tile trashcan/instruction area when the user has the
brightness slider hidden.
Also adds a scrollview to the QS Settings page to allow the list to grow
without impacting the height of the qs panel.
Ref: CYNGNOS-1644
Change-Id: I03f552ec28a978c4cad1e7e7a52648ec3d311a07
Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'packages/SystemUI/res')
-rw-r--r-- | packages/SystemUI/res/layout/qs_settings.xml | 114 | ||||
-rw-r--r-- | packages/SystemUI/res/layout/qs_tile_top.xml | 6 | ||||
-rw-r--r-- | packages/SystemUI/res/values/cm_strings.xml | 1 |
3 files changed, 67 insertions, 54 deletions
diff --git a/packages/SystemUI/res/layout/qs_settings.xml b/packages/SystemUI/res/layout/qs_settings.xml index dcf04a4..b7c8d60 100644 --- a/packages/SystemUI/res/layout/qs_settings.xml +++ b/packages/SystemUI/res/layout/qs_settings.xml @@ -18,67 +18,79 @@ xmlns:systemui="http://schemas.android.com/apk/res-auto" android:id="@+id/quick_settings_settings_recursion_container" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingTop="16dp" + android:layout_height="match_parent" android:orientation="vertical"> - <TextView + <LinearLayout android:layout_width="match_parent" - android:layout_height="48dp" - android:paddingLeft="16dp" - android:paddingRight="16dp" - android:gravity="center_vertical" - android:textColor="@color/qs_title_text_color" - android:text="@string/quick_settings_title_header"/> - - <!-- show weather --> - <com.android.systemui.qs.QSBooleanSettingRow - style="@style/SettingRow" - android:key="status_bar_show_weather" - android:title="@string/quick_settings_title_show_weather" - systemui:defaultValue="1" - systemui:table="cm_system" - /> + android:layout_height="match_parent" + android:orientation="vertical"> - <TextView - android:layout_width="match_parent" - android:layout_height="48dp" - android:paddingLeft="16dp" - android:paddingRight="16dp" - android:gravity="center_vertical" - android:textColor="@color/qs_title_text_color" - android:text="@string/quick_settings_title_tiles"/> + <TextView + android:layout_width="match_parent" + android:layout_height="48dp" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:gravity="center_vertical" + android:textColor="@color/qs_title_text_color" + android:text="@string/quick_settings_title_header"/> - <!-- first row large --> - <com.android.systemui.qs.QSBooleanSettingRow - style="@style/SettingRow" - android:title="@string/quick_settings_title_enlarge_first_row" - android:key="sysui_qs_main_tiles" - systemui:defaultValue="1" - systemui:table="cm_secure" /> + <!-- show weather --> + <com.android.systemui.qs.QSBooleanSettingRow + style="@style/SettingRow" + android:key="status_bar_show_weather" + android:title="@string/quick_settings_title_show_weather" + systemui:defaultValue="1" + systemui:table="cm_system"/> - <com.android.systemui.qs.QSBooleanSettingRow - style="@style/SettingRow" - android:title="@string/quick_settings_title_advanced_location" - android:key="qs_location_advanced" - systemui:defaultValue="0" - systemui:table="cm_secure" /> + <!-- brightness slider --> + <com.android.systemui.qs.QSBooleanSettingRow + style="@style/SettingRow" + android:key="qs_show_brightness_slider" + android:title="@string/quick_settings_title_show_brightness_slider" + systemui:defaultValue="1" + systemui:table="cm_system"/> - <LinearLayout - android:id="@+id/reset_tiles" - style="@style/SettingRow"> <TextView - android:layout_width="0dp" - android:layout_height="24dp" + android:layout_width="match_parent" + android:layout_height="48dp" + android:paddingLeft="16dp" + android:paddingRight="16dp" android:gravity="center_vertical" - android:layout_gravity="center_vertical" - android:layout_weight="1" - android:id="@+id/title" - android:textColor="@color/qs_tile_reset_to_default_text_color" - android:text="@string/quick_settings_tile_reset_to_default" - android:contentDescription="@null"/> + android:textColor="@color/qs_title_text_color" + android:text="@string/quick_settings_title_tiles"/> - </LinearLayout> + <!-- first row large --> + <com.android.systemui.qs.QSBooleanSettingRow + style="@style/SettingRow" + android:title="@string/quick_settings_title_enlarge_first_row" + android:key="sysui_qs_main_tiles" + systemui:defaultValue="1" + systemui:table="cm_secure"/> + + <com.android.systemui.qs.QSBooleanSettingRow + style="@style/SettingRow" + android:title="@string/quick_settings_title_advanced_location" + android:key="qs_location_advanced" + systemui:defaultValue="0" + systemui:table="cm_secure"/> + + <LinearLayout + android:id="@+id/reset_tiles" + style="@style/SettingRow"> + <TextView + android:layout_width="0dp" + android:layout_height="24dp" + android:gravity="center_vertical" + android:layout_gravity="center_vertical" + android:layout_weight="1" + android:id="@+id/title" + android:textColor="@color/qs_tile_reset_to_default_text_color" + android:text="@string/quick_settings_tile_reset_to_default" + android:contentDescription="@null"/> + </LinearLayout> + + </LinearLayout> </com.android.systemui.qs.QSSettings> diff --git a/packages/SystemUI/res/layout/qs_tile_top.xml b/packages/SystemUI/res/layout/qs_tile_top.xml index 4413ec3..a302c73 100644 --- a/packages/SystemUI/res/layout/qs_tile_top.xml +++ b/packages/SystemUI/res/layout/qs_tile_top.xml @@ -29,7 +29,7 @@ <LinearLayout android:id="@+id/delete_container" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:paddingLeft="16dp" android:paddingRight="16dp" android:orientation="horizontal"> @@ -48,7 +48,7 @@ <LinearLayout android:id="@+id/edit_container" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:paddingLeft="16dp" android:paddingRight="16dp" android:orientation="horizontal"> @@ -73,7 +73,7 @@ <TextView android:id="@+id/qs_toast" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:paddingLeft="16dp" android:paddingRight="16dp" android:gravity="center_vertical" diff --git a/packages/SystemUI/res/values/cm_strings.xml b/packages/SystemUI/res/values/cm_strings.xml index 40aca087..86b87e4 100644 --- a/packages/SystemUI/res/values/cm_strings.xml +++ b/packages/SystemUI/res/values/cm_strings.xml @@ -89,6 +89,7 @@ <string name="quick_settings_title_header">Header</string> <string name="quick_settings_title_tiles">Tiles</string> <string name="quick_settings_title_show_weather">Show weather</string> + <string name="quick_settings_title_show_brightness_slider">Show brightness slider</string> <string name="quick_settings_title_enlarge_first_row">Enlarge first row</string> <!-- Screen pinning dialog description (for devices without navbar) --> |