notification_content.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright (C) 2017 The Android Open Source Project
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. -->
  13. <merge
  14. xmlns:android="http://schemas.android.com/apk/res/android"
  15. android:layout_width="match_parent"
  16. android:layout_height="wrap_content">
  17. <!-- header -->
  18. <FrameLayout
  19. android:id="@+id/header"
  20. android:layout_width="match_parent"
  21. android:layout_height="wrap_content"
  22. android:paddingEnd="@dimen/notification_padding"
  23. android:paddingStart="@dimen/notification_padding">
  24. <TextView
  25. android:id="@+id/notification_text"
  26. android:paddingTop="@dimen/notification_padding"
  27. android:layout_width="wrap_content"
  28. android:layout_height="wrap_content"
  29. android:layout_gravity="bottom|start"
  30. android:text="@string/notifications_header"
  31. android:textColor="?android:attr/textColorPrimary"
  32. android:textSize="@dimen/notification_header_text_size"
  33. style="@style/TextHeadline"/>
  34. <TextView
  35. android:id="@+id/notification_count"
  36. android:layout_width="@dimen/notification_circle_icon_size"
  37. android:layout_height="@dimen/notification_circle_icon_size"
  38. android:background="@drawable/notification_circle"
  39. android:layout_gravity="bottom|end"
  40. android:gravity="center"
  41. android:textColor="?android:attr/textColorPrimary"
  42. android:textSize="@dimen/notification_header_count_text_size"
  43. style="@style/TextHeadline"/>
  44. </FrameLayout>
  45. <!-- Main view -->
  46. <com.android.launcher3.notification.NotificationMainView
  47. android:id="@+id/main_view"
  48. android:layout_width="match_parent"
  49. android:layout_height="wrap_content"
  50. android:focusable="true" >
  51. <LinearLayout
  52. android:id="@+id/text_and_background"
  53. android:layout_width="match_parent"
  54. android:layout_height="match_parent"
  55. android:background="?attr/popupColorPrimary"
  56. android:gravity="center_vertical"
  57. android:orientation="vertical"
  58. android:paddingTop="@dimen/notification_padding"
  59. android:paddingBottom="@dimen/notification_padding"
  60. android:paddingEnd="@dimen/notification_padding"
  61. android:paddingStart="@dimen/notification_main_text_padding_start">
  62. <TextView
  63. android:id="@+id/title"
  64. android:layout_width="match_parent"
  65. android:layout_height="wrap_content"
  66. android:ellipsize="end"
  67. android:lines="1"
  68. android:textAlignment="viewStart"
  69. android:textColor="?android:attr/textColorPrimary"
  70. android:textSize="@dimen/notification_main_title_size"
  71. style="@style/TextHeadline" />
  72. <TextView
  73. android:id="@+id/text"
  74. android:layout_width="match_parent"
  75. android:layout_height="wrap_content"
  76. android:ellipsize="end"
  77. android:lines="1"
  78. android:textColor="?android:attr/textColorPrimary"
  79. android:textSize="@dimen/notification_main_text_size" />
  80. </LinearLayout>
  81. <View
  82. android:id="@+id/popup_item_icon"
  83. android:layout_width="@dimen/notification_icon_size"
  84. android:layout_height="@dimen/notification_icon_size"
  85. android:layout_gravity="start"
  86. android:layout_marginTop="@dimen/notification_padding"
  87. android:layout_marginStart="@dimen/notification_icon_padding" />
  88. </com.android.launcher3.notification.NotificationMainView>
  89. </merge>