diff options
author | Roman Birg <roman@cyngn.com> | 2015-12-01 19:58:58 -0800 |
---|---|---|
committer | Roman Birg <roman@cyngn.com> | 2015-12-07 14:18:12 -0800 |
commit | 6f6f1b60b699eea7c6a05fd82a61f62764565334 (patch) | |
tree | 08ee1b1eb6552f1f8bcde79ad854195975c4bc46 /packages/SystemUI/res/layout | |
parent | 8800d58e8b39e2c178d912249c8fd22bd0131848 (diff) | |
download | frameworks_base-6f6f1b60b699eea7c6a05fd82a61f62764565334.zip frameworks_base-6f6f1b60b699eea7c6a05fd82a61f62764565334.tar.gz frameworks_base-6f6f1b60b699eea7c6a05fd82a61f62764565334.tar.bz2 |
Quick settings: add statusbar setting page while editing
Adds a Settings page accessible while editing tiles at the very first
slot of the tile viewpager.
Long pressing the edit tile will put the qs panel into edit mode and
swing over to the Settings page.
Change-Id: Ie8416ac5446794a03e33ae260538ffcd9a253d57
Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'packages/SystemUI/res/layout')
-rw-r--r-- | packages/SystemUI/res/layout/qs_detail_header.xml | 13 | ||||
-rw-r--r-- | packages/SystemUI/res/layout/qs_settings.xml | 77 | ||||
-rw-r--r-- | packages/SystemUI/res/layout/qs_settings_row.xml | 34 | ||||
-rw-r--r-- | packages/SystemUI/res/layout/qs_tile_top.xml (renamed from packages/SystemUI/res/layout/qs_tile_top) | 19 |
4 files changed, 134 insertions, 9 deletions
diff --git a/packages/SystemUI/res/layout/qs_detail_header.xml b/packages/SystemUI/res/layout/qs_detail_header.xml index 5a96dc3..6f07543 100644 --- a/packages/SystemUI/res/layout/qs_detail_header.xml +++ b/packages/SystemUI/res/layout/qs_detail_header.xml @@ -37,4 +37,15 @@ android:clickable="false" android:textAppearance="@style/TextAppearance.QS.DetailHeader" /> -</com.android.keyguard.AlphaOptimizedLinearLayout>
\ No newline at end of file + <TextView + android:id="@+id/done" + android:text="@string/quick_settings_done" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:gravity="center" + android:minWidth="88dp" + android:paddingRight="12dp" + android:textAppearance="@style/TextAppearance.QS.DetailButton" + android:clickable="false" + android:focusable="false" /> +</com.android.keyguard.AlphaOptimizedLinearLayout> diff --git a/packages/SystemUI/res/layout/qs_settings.xml b/packages/SystemUI/res/layout/qs_settings.xml new file mode 100644 index 0000000..203364e --- /dev/null +++ b/packages/SystemUI/res/layout/qs_settings.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 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. +--> +<com.android.systemui.qs.QSSettings + xmlns:android="http://schemas.android.com/apk/res/android" + 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:orientation="vertical"> + + <TextView + android:layout_width="match_parent" + android:layout_height="48dp" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:gravity="center_vertical" + android:textColor="#80cbc4" + 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:table="cm_system" + /> + + <TextView + android:layout_width="match_parent" + android:layout_height="48dp" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:gravity="center_vertical" + android:textColor="#80cbc4" + android:text="@string/quick_settings_title_tiles"/> + + <!-- TODO implement! + first row large + <com.android.systemui.qs.QSBooleanSettingRow + style="@style/SettingRow" + android:key="someKey1" + android:title="@string/quick_settings_title_enlarge_first_row" + systemui:table="system" + />--> + + <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="@android:color/white" + android:text="@string/quick_settings_tile_reset_to_default" + android:contentDescription="@null"/> + + </LinearLayout> + +</com.android.systemui.qs.QSSettings> + diff --git a/packages/SystemUI/res/layout/qs_settings_row.xml b/packages/SystemUI/res/layout/qs_settings_row.xml new file mode 100644 index 0000000..98ac6fc --- /dev/null +++ b/packages/SystemUI/res/layout/qs_settings_row.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 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. +--> +<merge xmlns:android="http://schemas.android.com/apk/res/android"> + <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="@android:color/white" + android:contentDescription="@null"/> + + <Switch + android:id="@+id/switcher" + android:layout_width="wrap_content" + android:layout_height="24dp" + android:gravity="center_vertical" + android:layout_gravity="center_vertical" + /> +</merge> diff --git a/packages/SystemUI/res/layout/qs_tile_top b/packages/SystemUI/res/layout/qs_tile_top.xml index 6d455ab..4847c77 100644 --- a/packages/SystemUI/res/layout/qs_tile_top +++ b/packages/SystemUI/res/layout/qs_tile_top.xml @@ -15,21 +15,21 @@ --> <com.android.systemui.qs.QSPanelTopView xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:systemui="http://schemas.android.com/apk/res-auto" android:id="@+id/qs_panel_top" android:layout_width="match_parent" - android:layout_height="match_parent" - android:paddingBottom="@dimen/qs_brightness_padding_top"> + android:layout_height="match_parent"> <!-- brightness --> <include android:id="@+id/brightness_container" + android:paddingTop="@dimen/qs_brightness_padding_top" layout="@layout/quick_settings_brightness_dialog"/> <!-- delete target --> <LinearLayout android:id="@+id/delete_container" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="match_parent" + android:paddingTop="@dimen/qs_brightness_padding_top" android:paddingLeft="16dp" android:paddingRight="16dp" android:orientation="horizontal"> @@ -39,6 +39,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" + android:layout_gravity="center" android:src="@drawable/ic_delete" /> </LinearLayout> @@ -47,7 +48,8 @@ <LinearLayout android:id="@+id/edit_container" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="match_parent" + android:paddingTop="@dimen/qs_brightness_padding_top" android:paddingLeft="16dp" android:paddingRight="16dp" android:orientation="horizontal"> @@ -72,13 +74,14 @@ <TextView android:id="@+id/qs_toast" - android:layout_height="wrap_content" + android:layout_height="match_parent" + android:paddingTop="@dimen/qs_brightness_padding_top" android:paddingLeft="16dp" android:paddingRight="16dp" android:gravity="center_vertical" + android:layout_gravity="center_vertical" android:layout_width="match_parent" - android:textColor="@color/quick_settings_toast_color" - android:visibility="invisible"/> + android:textColor="@color/quick_settings_toast_color"/> </com.android.systemui.qs.QSPanelTopView> |