Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: chrome/android/java/res/layout/web_notification_button.xml

Issue 1441723002: Notification custom layouts: paint the button icon for Material. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Documentation tweaks. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright 2015 The Chromium Authors. All rights reserved. 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 3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. --> 4 found in the LICENSE file. -->
5 5
6 <Button xmlns:android="http://schemas.android.com/apk/res/android" 6 <!--
7 android:drawablePadding="0dp" 7 Overlays a Button on top of an ImageView. Via a RemoteViews, the only way to set a Bitmap is on
8 android:ellipsize="end" 8 an ImageView. We have a Bitmap because it is the format that can be painted to match the theme,
9 android:gravity="start|center_vertical" 9 and it is the format we get when loading an image from the network.
10 android:id="@+id/button" 10 -->
11 <FrameLayout
newt (away) 2015/11/16 17:50:08 Do these views need to overlap? If not, can't you
Michael van Ouwerkerk 2015/11/17 12:00:23 I would have preferred to use RemoteViews#setTextV
newt (away) 2015/11/17 20:04:40 Yowsers. Thanks for the run down. I wasn't thinkin
Michael van Ouwerkerk 2015/11/18 14:08:40 Done. I've added some more docs here.
12 xmlns:android="http://schemas.android.com/apk/res/android"
13 xmlns:tools="http://schemas.android.com/tools"
14 tools:ignore="MergeRootFrame"
15 android:layout_width="0dp"
11 android:layout_height="48dp" 16 android:layout_height="48dp"
12 android:layout_weight="1" 17 android:layout_weight="1">
13 android:layout_width="0dp" 18
14 android:paddingStart="8dp" 19 <ImageView
15 android:singleLine="true" 20 android:id="@+id/button_icon"
16 android:textSize="13sp" 21 android:layout_width="wrap_content"
17 style="@style/WebNotificationButton"/> 22 android:layout_height="match_parent"
23 android:layout_marginStart="8dp"
24 android:layout_gravity="start|center_vertical"
25 android:maxWidth="48dp"
26 android:contentDescription="@null"
27 android:scaleType="centerInside"/>
28
29 <Button
newt (away) 2015/11/17 20:04:40 Will there always be button text, or will we have
Michael van Ouwerkerk 2015/11/18 14:08:40 Action (button) titles are required at the JavaScr
30 android:id="@+id/button"
31 android:layout_width="match_parent"
32 android:layout_height="match_parent"
33 android:drawablePadding="0dp"
newt (away) 2015/11/17 20:04:40 not needed? (since there are no compound drawables
Michael van Ouwerkerk 2015/11/18 14:08:40 Done.
34 android:ellipsize="end"
35 android:gravity="start|center_vertical"
36 android:paddingStart="8dp"
37 android:singleLine="true"
38 android:textSize="13sp"
39 style="@style/WebNotificationButton"/>
40
41 </FrameLayout>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698