Merge "Mock compliance for notification guts."
This commit is contained in:
committed by
Android (Google) Code Review
commit
f890afad17
33
core/res/res/drawable/ic_notification_alert.xml
Normal file
33
core/res/res/drawable/ic_notification_alert.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
Copyright (C) 2016 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.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24.0dp"
|
||||
android:height="24.0dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:pathData="M18.4,2.2L17.0,3.6c2.0,1.4 3.3,3.7 3.5,6.4l2.0,0.0C22.3,6.8 20.8,4.0 18.4,2.2z"
|
||||
android:fillColor="#231F20"/>
|
||||
<path
|
||||
android:pathData="M7.1,3.6L5.7,2.2C3.3,4.0 1.7,6.8 1.5,10.0l2.0,0.0C3.7,7.3 5.0,5.0 7.1,3.6z"
|
||||
android:fillColor="#231F20"/>
|
||||
<path
|
||||
android:pathData="M18.5,10.5c0.0,-3.1 -2.1,-5.6 -5.0,-6.3L13.5,3.5C13.5,2.7 12.8,2.0 12.0,2.0s-1.5,0.7 -1.5,1.5l0.0,0.7c-2.9,0.7 -5.0,3.2 -5.0,6.3L5.5,16.0l-2.0,2.0l0.0,1.0l17.0,0.0l0.0,-1.0l-2.0,-2.0L18.5,10.5zM13.0,16.5l-2.0,0.0l0.0,-2.0l2.0,0.0L13.0,16.5zM13.0,12.5l-2.0,0.0l0.0,-6.0l2.0,0.0L13.0,12.5z"
|
||||
android:fillColor="#231F20"/>
|
||||
<path
|
||||
android:pathData="M12.0,22.0c1.1,0.0 2.0,-0.9 2.0,-2.0L10.0,20.0C10.0,21.1 10.9,22.0 12.0,22.0z"
|
||||
android:fillColor="#231F20"/>
|
||||
</vector>
|
||||
25
core/res/res/drawable/ic_notification_block.xml
Normal file
25
core/res/res/drawable/ic_notification_block.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
Copyright (C) 2016 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.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24.0dp"
|
||||
android:height="24.0dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12.0,2.0C6.48,2.0 2.0,6.48 2.0,12.0s4.48,10.0 10.0,10.0 10.0,-4.48 10.0,-10.0S17.52,2.0 12.0,2.0zM4.0,12.0c0.0,-4.42 3.58,-8.0 8.0,-8.0 1.85,0.0 3.5,0.63 4.9,1.69L5.69,16.9C4.63,15.55 4.0,13.85 4.0,12.0zm8.0,8.0c-1.85,0.0 -3.55,-0.63 -4.9,-1.69L18.31,7.1C19.37,8.45 20.0,10.15 20.0,12.0c0.0,4.42 -3.58,8.0 -8.0,8.0z"/>
|
||||
</vector>
|
||||
@@ -25,15 +25,15 @@
|
||||
android:gravity="top|start"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@*android:dimen/notification_content_margin_start"
|
||||
android:paddingEnd="@*android:dimen/notification_content_margin_end"
|
||||
android:background="@color/notification_guts_text_color" >
|
||||
android:paddingEnd="8dp"
|
||||
android:background="@color/notification_guts_bg_color" >
|
||||
|
||||
<!-- header -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:layout_height="30dp"
|
||||
android:paddingTop="9dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:id="@+id/notification_guts_header"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center_vertical|start">
|
||||
@@ -42,25 +42,21 @@
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:src="@android:drawable/arrow_down_float" />
|
||||
<TextView
|
||||
android:id="@+id/pkgname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Notification.Info"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:textColor="@color/notification_guts_title_color" />
|
||||
android:id="@+id/pkgname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextAppearance.NotificationGuts.Header" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/debug_info"
|
||||
android:layout_weight="0"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Notification.Time"
|
||||
android:layout_gravity="bottom|start"
|
||||
android:visibility="gone"
|
||||
android:textColor="#ffffff" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/debug_info"
|
||||
android:layout_weight="0"
|
||||
style="@style/TextAppearance.NotificationGuts.Header"
|
||||
android:layout_gravity="bottom|start"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
<!-- Importance slider -->
|
||||
<LinearLayout
|
||||
@@ -70,16 +66,17 @@
|
||||
android:orientation="vertical"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:paddingBottom="8dip">
|
||||
android:paddingBottom="8dip"
|
||||
android:paddingEnd="8dp" >
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Subhead"
|
||||
android:textColor="@color/notification_guts_text_color"
|
||||
style="@style/TextAppearance.NotificationGuts.Primary"
|
||||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal"/>
|
||||
android:fadingEdge="horizontal"
|
||||
android:paddingBottom="2dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/summary"
|
||||
@@ -87,38 +84,41 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignStart="@android:id/title"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Body1"
|
||||
android:textColor="@color/notification_guts_title_color"
|
||||
style="@style/TextAppearance.NotificationGuts.Secondary"
|
||||
android:maxLines="3"
|
||||
android:minLines="2" />
|
||||
android:minLines="2"
|
||||
android:paddingBottom="4dp" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:paddingTop="8dp" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/low_importance"
|
||||
android:src="@android:drawable/ic_menu_close_clear_cancel"
|
||||
android:src="@*android:drawable/ic_notification_block"
|
||||
android:layout_gravity="center_vertical|start"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginStart="56dp"
|
||||
android:layout_marginEnd="56dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:focusable="true"
|
||||
android:background="#00ffffff"
|
||||
android:thumbTint="@android:color/white"
|
||||
android:progressTint="@android:color/white" />
|
||||
android:progressBackgroundTint="@color/notification_guts_secondary_slider_color"
|
||||
android:thumbTint="@color/notification_guts_slider_color"
|
||||
android:progressTint="@color/notification_guts_slider_color"
|
||||
style="@android:style/Widget.Material.SeekBar.Discrete"
|
||||
android:tickMarkTint="@android:color/black" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/max_importance"
|
||||
android:src="@android:drawable/ic_popup_reminder"
|
||||
android:src="@*android:drawable/ic_notification_alert"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"/>
|
||||
@@ -128,19 +128,22 @@
|
||||
<RadioGroup
|
||||
android:id="@+id/apply_to"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp">
|
||||
android:layout_height="wrap_content" >
|
||||
<RadioButton android:id="@+id/apply_to_topic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/notification_guts_text_color"
|
||||
android:visibility="gone"/>
|
||||
android:layout_height="48dp"
|
||||
style="@style/TextAppearance.NotificationGuts.Primary"
|
||||
android:visibility="gone"
|
||||
android:buttonTint="#858383"
|
||||
/>
|
||||
<RadioButton android:id="@+id/apply_to_app"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:text="@string/apply_to_app"
|
||||
android:textColor="@color/notification_guts_text_color"
|
||||
android:visibility="gone"/>
|
||||
style="@style/TextAppearance.NotificationGuts.Primary"
|
||||
android:visibility="gone"
|
||||
android:buttonTint="#858383"
|
||||
/>
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
<!-- buttons -->
|
||||
@@ -148,29 +151,30 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="16dp" >
|
||||
android:paddingBottom="8dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_settings"
|
||||
android:text="@string/notification_more_settings"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.NotificationGuts"
|
||||
android:layout_height="48dp"
|
||||
style="@style/TextAppearance.NotificationGuts.Button"
|
||||
android:background="@drawable/btn_borderless_rect"
|
||||
android:gravity="center"
|
||||
android:paddingEnd="24dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingStart="8dp"
|
||||
android:focusable="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/done"
|
||||
android:text="@string/notification_done"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.NotificationGuts"
|
||||
android:layout_height="48dp"
|
||||
style="@style/TextAppearance.NotificationGuts.Button"
|
||||
android:background="@drawable/btn_borderless_rect"
|
||||
android:gravity="center"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:focusable="true"/>
|
||||
</LinearLayout>
|
||||
</com.android.systemui.statusbar.NotificationGuts>
|
||||
|
||||
@@ -100,10 +100,9 @@
|
||||
<color name="current_user_border_color">@color/system_accent_color</color>
|
||||
|
||||
<!-- The "inside" of a notification, reached via longpress -->
|
||||
<color name="notification_guts_bg_color">@*android:color/material_deep_teal_500</color>
|
||||
<color name="notification_guts_title_color">#B2DFDB</color>
|
||||
<color name="notification_guts_text_color">#FFFFFFFF</color>
|
||||
<color name="notification_guts_btn_color">#FFFFFFFF</color>
|
||||
<color name="notification_guts_bg_color">@*android:color/material_grey_50</color>
|
||||
<color name="notification_guts_slider_color">@*android:color/material_deep_teal_500</color>
|
||||
<color name="notification_guts_secondary_slider_color">#858383</color>
|
||||
|
||||
<color name="assist_orb_color">#ffffff</color>
|
||||
|
||||
|
||||
@@ -319,10 +319,30 @@
|
||||
|
||||
<style name="TextAppearance.NotificationGuts">
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textColor">@color/notification_guts_btn_color</item>
|
||||
<item name="android:fontFamily">sans-serif-medium</item>
|
||||
<item name="android:textColor">@android:color/black</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.NotificationGuts.Header">
|
||||
<item name="android:alpha">.38</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.NotificationGuts.Secondary">
|
||||
<item name="android:alpha">.54</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.NotificationGuts.Primary">
|
||||
<item name="android:alpha">.87</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.NotificationGuts.Button">
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textAllCaps">true</item>
|
||||
<item name="android:fontFamily">sans-serif-medium</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:textColor">@*android:color/material_deep_teal_500</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user