OLD | NEW |
---|---|
(Empty) | |
1 <?xml version="1.0" encoding="utf-8"?> | |
2 <!-- Copyright 2015 The Chromium Authors. All rights reserved. | |
3 Use of this source code is governed by a BSD-style license that can be | |
4 found in the LICENSE file. --> | |
5 | |
6 <!-- | |
7 Web notification compact layout. | |
Peter Beverloo
2015/10/12 14:08:30
note: it's going to be a while before I can comfor
Michael van Ouwerkerk
2015/10/12 17:10:59
That's a cool article. As it states, this matters
| |
8 _______________________________________________________ | |
9 | | | | |
10 | | Title text 1:23 pm | | |
11 | Icon | Body text | | |
12 | | https://www.example.com/ | | |
13 |________|____________________________________________| | |
14 --> | |
15 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
16 android:layout_width="match_parent" | |
17 android:layout_height="wrap_content"> | |
18 | |
19 <FrameLayout | |
20 android:layout_width="@android:dimen/notification_large_icon_width" | |
21 android:layout_height="@android:dimen/notification_large_icon_height" > | |
22 | |
23 <ImageView | |
24 android:id="@+id/icon" | |
25 android:layout_width="match_parent" | |
26 android:layout_height="match_parent" | |
27 android:scaleType="center" | |
28 android:contentDescription="@null"/> | |
29 | |
30 <ImageView | |
31 android:layout_width="match_parent" | |
32 android:layout_height="match_parent" | |
33 android:scaleType="center" | |
34 android:contentDescription="@null" | |
35 android:src="@drawable/ic_chrome"/> | |
36 | |
37 </FrameLayout> | |
38 | |
39 <LinearLayout | |
40 android:layout_width="match_parent" | |
41 android:layout_height="match_parent" | |
42 android:orientation="vertical"> | |
43 | |
44 <LinearLayout | |
45 android:layout_width="match_parent" | |
46 android:layout_height="wrap_content" | |
47 android:orientation="horizontal"> | |
48 | |
49 <TextView | |
50 android:id="@+id/title" | |
51 android:layout_width="0dp" | |
Peter Beverloo
2015/10/12 14:08:30
moan: how lovely
Michael van Ouwerkerk
2015/10/12 17:10:59
Yeah, the weight does it.
| |
52 android:layout_height="wrap_content" | |
53 android:layout_weight="1" | |
54 android:ellipsize="end" | |
55 android:singleLine="true" | |
56 style="@style/WebNotificationTitle"/> | |
57 | |
58 <TextView | |
59 android:id="@+id/time" | |
60 android:layout_width="wrap_content" | |
61 android:layout_height="wrap_content" | |
62 android:singleLine="true" | |
63 style="@style/WebNotificationTime"/> | |
64 | |
65 </LinearLayout> | |
66 | |
67 <TextView | |
68 android:id="@+id/body" | |
69 android:layout_width="match_parent" | |
70 android:layout_height="wrap_content" | |
71 android:ellipsize="end" | |
72 android:singleLine="true" | |
73 style="@style/WebNotificationBody"/> | |
74 | |
75 <TextView | |
76 android:id="@+id/origin" | |
77 android:layout_width="match_parent" | |
78 android:layout_height="wrap_content" | |
79 android:ellipsize="end" | |
80 android:singleLine="true" | |
81 style="@style/WebNotificationOrigin"/> | |
82 | |
83 </LinearLayout> | |
84 | |
85 </LinearLayout> | |
OLD | NEW |