App-level notification configuration settings page.
New sub-page off of notification settings to ban/unban apps and navigate to an app's notification configuration activity (if configured). Centralized all notification settings artifacts under a new settings subpackage. Bug: 13935172 Change-Id: I53b75c02f0091900734d17dc9217035d0df9b466
This commit is contained in:
@@ -18,67 +18,76 @@
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:id="@android:id/button1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@+id/divider"
|
||||
>
|
||||
android:layout_alignWithParentIfMissing="true"
|
||||
android:layout_toStartOf="@+id/settings_divider"
|
||||
android:background="?android:attr/listChoiceBackgroundIndicator" >
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@android:dimen/app_icon_size"
|
||||
android:layout_height="@android:dimen/app_icon_size"
|
||||
android:layout_width="@dimen/notification_app_icon_size"
|
||||
android:layout_height="@dimen/notification_app_icon_size"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:contentDescription="@null"
|
||||
android:maxHeight="@android:dimen/app_icon_size"
|
||||
android:maxWidth="@android:dimen/app_icon_size"
|
||||
android:scaleType="fitCenter" />
|
||||
android:scaleType="center" />
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon1"
|
||||
android:layout_width="@dimen/notification_app_icon_badge_size"
|
||||
android:layout_height="@dimen/notification_app_icon_badge_size"
|
||||
android:layout_marginLeft="@dimen/notification_app_icon_badge_margin"
|
||||
android:layout_marginTop="@dimen/notification_app_icon_badge_margin"
|
||||
android:background="#bb8b0000"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon2"
|
||||
android:layout_width="@dimen/notification_app_icon_badge_size"
|
||||
android:layout_height="@dimen/notification_app_icon_badge_size"
|
||||
android:layout_alignBottom="@android:id/icon"
|
||||
android:layout_alignEnd="@android:id/icon"
|
||||
android:layout_marginBottom="@dimen/notification_app_icon_badge_margin"
|
||||
android:layout_marginEnd="@dimen/notification_app_icon_badge_margin"
|
||||
android:background="#bb006400"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@android:id/button1"
|
||||
android:layout_toEndOf="@android:id/icon"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textAlignment="viewStart"
|
||||
android:labelFor="@android:id/button2" />
|
||||
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Divider -->
|
||||
|
||||
<ImageView
|
||||
android:id="@id/divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
<View
|
||||
android:id="@+id/settings_divider"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="@dimen/notification_app_settings_divider_height"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@android:id/button2"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/nav_divider" />
|
||||
|
||||
<!-- Settings icon -->
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/button2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignBottom="@android:id/widget_frame"
|
||||
android:layout_width="@dimen/notification_app_icon_size"
|
||||
android:layout_height="@dimen/notification_app_icon_size"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignTop="@android:id/widget_frame"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_margin="0dip"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?android:attr/listChoiceBackgroundIndicator"
|
||||
android:contentDescription="@string/notification_app_settings_button"
|
||||
android:padding="8dip"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:src="@drawable/ic_bt_config" />
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_settings_generic" />
|
||||
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:id="@+id/row_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
</RelativeLayout>
|
||||
47
res/layout/notification_app_dialog.xml
Normal file
47
res/layout/notification_app_dialog.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<!--
|
||||
Copyright (C) 2014 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.
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@dimen/notification_app_icon_size"
|
||||
android:layout_height="@dimen/notification_app_icon_size"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/notification_app_icon_size"
|
||||
android:layout_toEndOf="@android:id/icon"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@android:id/button1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/notification_app_icon_size"
|
||||
android:layout_below="@android:id/icon"
|
||||
android:layout_marginStart="@dimen/content_margin_left"
|
||||
android:text="@string/app_notifications_dialog_show"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem" />
|
||||
|
||||
</RelativeLayout>
|
||||
42
res/layout/notification_app_list.xml
Normal file
42
res/layout/notification_app_list.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2014 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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ListView
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#0000"
|
||||
android:dividerHeight="0px"
|
||||
android:fastScrollAlwaysVisible="true"
|
||||
android:fastScrollEnabled="true"
|
||||
android:listSelector="#0000"
|
||||
android:scrollbarStyle="outsideInset" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/loading_notification_apps"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
</LinearLayout>
|
||||
19
res/layout/notification_app_section.xml
Normal file
19
res/layout/notification_app_section.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<!--
|
||||
Copyright (C) 2014 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.
|
||||
-->
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="?android:attr/listSeparatorTextViewStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
@@ -1,115 +0,0 @@
|
||||
<!--
|
||||
Copyright (C) 2013 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.
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<!-- Dream selectable row (icon, caption, radio button) -->
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@android:id/widget_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@+id/divider"
|
||||
android:background="?android:attr/selectableItemBackground" >
|
||||
|
||||
<!-- Dream icon -->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pkgicon"
|
||||
android:layout_width="@*android:dimen/status_bar_icon_size"
|
||||
android:layout_height="@*android:dimen/status_bar_icon_size"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:contentDescription="@null"
|
||||
android:maxHeight="@*android:dimen/status_bar_icon_size"
|
||||
android:maxWidth="@*android:dimen/status_bar_icon_size"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="@*android:dimen/status_bar_icon_size"
|
||||
android:layout_height="@*android:dimen/status_bar_icon_size"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@id/pkgicon"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:contentDescription="@null"
|
||||
android:maxHeight="@*android:dimen/status_bar_icon_size"
|
||||
android:maxWidth="@*android:dimen/status_bar_icon_size"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
<!-- Dream caption -->
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@android:id/button1"
|
||||
android:layout_toEndOf="@android:id/icon"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textAlignment="viewStart"
|
||||
android:labelFor="@android:id/button2" />
|
||||
|
||||
<!-- Dream radio button -->
|
||||
|
||||
<!--<RadioButton
|
||||
android:id="@android:id/button1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:duplicateParentState="true"
|
||||
android:clickable="false"
|
||||
android:focusable="false" />-->
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Divider -->
|
||||
|
||||
<ImageView
|
||||
android:id="@id/divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@android:id/button2"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/nav_divider" />
|
||||
|
||||
<!-- Settings icon -->
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/button2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignBottom="@android:id/widget_frame"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignTop="@android:id/widget_frame"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_margin="0dip"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:contentDescription="@string/screensaver_settings_button"
|
||||
android:padding="8dip"
|
||||
android:src="@drawable/ic_bt_config" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -33,7 +33,7 @@
|
||||
android:layout_width="@*android:dimen/status_bar_icon_size"
|
||||
android:layout_height="@*android:dimen/status_bar_icon_size"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@id/pkgicon"
|
||||
android:layout_toEndOf="@+id/pkgicon"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:contentDescription="@null"
|
||||
|
||||
Reference in New Issue
Block a user