blob: b1991f907d71be000a1be5dfaaf65e3b7460913d [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2015 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<!--
Overlays a Button on top of an ImageView. Via a RemoteViews the only way to set an image, apply
a color filter, and have API level 16+ compatibility, is to use an ImageView. There are some
similar methods for Button but they are either hidden, require too high an API level, or both.
The Button must be on top of the ImageView so that it can be tapped, and so that its text will
be read out by TalkBack.
-->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MergeRootFrame"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1">
<ImageView
android:id="@+id/button_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_gravity="start|center_vertical"
android:adjustViewBounds="true"
android:maxHeight="32dp"
android:maxWidth="32dp"
android:contentDescription="@null"
android:scaleType="centerInside"/>
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ellipsize="end"
android:gravity="start|center_vertical"
android:paddingStart="8dp"
android:singleLine="true"
android:textSize="13sp"
style="@style/WebNotificationButton"/>
</FrameLayout>