notification_content.xml 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. <com.android.launcher3.notification.NotificationMainView
  14. xmlns:android="http://schemas.android.com/apk/res/android"
  15. android:layout_width="match_parent"
  16. android:layout_height="@dimen/notification_container_height"
  17. android:orientation="vertical">
  18. <!-- header -->
  19. <FrameLayout
  20. android:id="@+id/header"
  21. android:layout_width="match_parent"
  22. android:layout_height="wrap_content"
  23. android:paddingEnd="@dimen/notification_padding_end"
  24. android:paddingTop="@dimen/notification_padding_header_top"
  25. android:paddingStart="@dimen/notification_header_padding_start">
  26. <TextView
  27. android:id="@+id/notification_text"
  28. android:layout_width="wrap_content"
  29. android:layout_height="wrap_content"
  30. android:layout_gravity="top|start"
  31. android:text="@string/notifications_header"
  32. android:textColor="?android:attr/textColorPrimary"
  33. android:textSize="@dimen/notification_header_text_size"
  34. style="@style/TextHeadline"/>
  35. <TextView
  36. android:id="@+id/notification_count"
  37. android:layout_width="@dimen/notification_circle_icon_size"
  38. android:layout_height="@dimen/notification_circle_icon_size"
  39. android:background="@drawable/notification_circle"
  40. android:layout_gravity="top|end"
  41. android:gravity="center"
  42. android:textColor="?android:attr/textColorPrimary"
  43. android:textSize="@dimen/notification_header_count_text_size"
  44. style="@style/TextHeadline"/>
  45. </FrameLayout>
  46. <!-- Main view -->
  47. <FrameLayout
  48. android:id="@+id/main_view"
  49. android:layout_width="match_parent"
  50. android:layout_height="wrap_content"
  51. android:paddingTop="@dimen/notification_padding_top"
  52. android:paddingBottom="@dimen/notification_padding_bottom"
  53. android:focusable="true" >
  54. <LinearLayout
  55. android:id="@+id/text_and_background"
  56. android:layout_width="match_parent"
  57. android:layout_height="match_parent"
  58. android:gravity="center_vertical"
  59. android:orientation="vertical"
  60. android:paddingEnd="@dimen/notification_padding_end"
  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|center_vertical"
  86. android:layout_marginStart="@dimen/notification_icon_padding_start"/>
  87. </FrameLayout>
  88. </com.android.launcher3.notification.NotificationMainView>