1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2008 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 --> 16 17 <!-- Layout file for the custom "expanded view" used by the ongoing call 18 Notification; see NotificationMgr.updateInCallNotification(). 19 20 Based on xml files in framework. 21 - status_bar_latest_event_content.xml 22 - status_bar_latest_event_content_large_icon.xml (included by the first xml) 23 To keep layout consistency, this layout includes almost all views inside those 24 original xmls, some of which aren't used by Phone app. 25 26 Differences: 27 - merges those two files into one. 28 - uses Chronometer instead of TextView for "@+id/text1" 29 - adds "android:" (for public assets) or "*android:" (for private assets) to 30 each @dimen/@drawable. 31 32 TODO: Consider updating Notification.Builder to allow you to specify an arbitrary 33 (remotable) view for each line, rather than just setContentTitle() / setContentText(). 34 That way we could use a Chronometer instead of a TextView in that one line, and not 35 need to duplicate the entire layout here. 36 --> 37 <!-- status_bar_latest_event_content.xml --> 38 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 39 android:id="@+id/status_bar_latest_event_content" 40 android:layout_width="match_parent" 41 android:layout_height="match_parent" 42 > 43 <ImageView android:id="@+id/icon" 44 android:layout_width="@android:dimen/notification_large_icon_width" 45 android:layout_height="@android:dimen/notification_large_icon_width" 46 android:background="@*android:drawable/notify_panel_notification_icon_bg_tile" 47 android:scaleType="center" 48 /> 49 <!-- status_bar_latest_event_content_large_icon.xml --> 50 <LinearLayout 51 android:id="@+id/status_bar_latest_event_content_large_icon" 52 android:layout_width="match_parent" 53 android:layout_height="wrap_content" 54 android:layout_gravity="center" 55 android:orientation="vertical" 56 android:paddingLeft="8dp" 57 android:paddingRight="8dp" 58 > 59 <TextView android:id="@+id/title" 60 android:textAppearance="@android:style/TextAppearance.StatusBar.EventContent.Title" 61 android:layout_width="match_parent" 62 android:layout_height="wrap_content" 63 android:singleLine="true" 64 android:ellipsize="marquee" 65 android:fadingEdge="horizontal" 66 /> 67 <TextView android:id="@+id/text2" 68 android:textAppearance="@android:style/TextAppearance.StatusBar.EventContent" 69 android:layout_width="match_parent" 70 android:layout_height="wrap_content" 71 android:layout_marginTop="-2dp" 72 android:layout_marginBottom="-2dp" 73 android:singleLine="true" 74 android:fadingEdge="horizontal" 75 android:ellipsize="marquee" 76 android:visibility="gone" 77 android:alpha="0.7" 78 /> 79 <LinearLayout 80 android:id="@+id/line3" 81 android:layout_width="match_parent" 82 android:layout_height="wrap_content" 83 android:orientation="horizontal" 84 android:alpha="0.7" 85 > 86 <Chronometer android:id="@+id/text1" 87 android:textAppearance="@android:style/TextAppearance.StatusBar.EventContent" 88 android:layout_width="0dp" 89 android:layout_height="wrap_content" 90 android:layout_weight="1" 91 android:layout_gravity="center" 92 android:singleLine="true" 93 android:ellipsize="marquee" 94 android:fadingEdge="horizontal" 95 /> 96 <TextView android:id="@+id/info" 97 android:textAppearance="@*android:style/TextAppearance.StatusBar.EventContent.Info" 98 android:layout_width="wrap_content" 99 android:layout_height="wrap_content" 100 android:layout_gravity="center" 101 android:layout_weight="0" 102 android:singleLine="true" 103 android:gravity="center" 104 android:paddingLeft="8dp" 105 /> 106 <ImageView android:id="@+id/icon" 107 android:layout_width="wrap_content" 108 android:layout_height="wrap_content" 109 android:layout_gravity="center" 110 android:layout_weight="0" 111 android:scaleType="center" 112 android:paddingLeft="8dp" 113 android:visibility="gone" 114 /> 115 </LinearLayout> 116 <ProgressBar 117 android:id="@android:id/progress" 118 android:layout_width="match_parent" 119 android:layout_height="wrap_content" 120 android:visibility="gone" 121 style="?android:attr/progressBarStyleHorizontal" 122 /> 123 </LinearLayout> <!-- end of status_bar_latest_event_content_large_icon.xml --> 124 125 </LinearLayout> <!-- end of status_bar_latest_event_content.xml --> 126