<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:baselineAligned="false"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingEnd="16dp"
android:paddingStart="16dp">
<!-- https://crbug.com/1369955: android::scaleType="fitStart" does not work correctly in RTL
layout as it always aligns the top left. Using wrapping FrameLayout as workaround. -->
<FrameLayout
android:layout_width="56dp"
android:layout_height="40dp"
android:gravity="start">
<ImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
tools:ignore="ContentDescription" />
</FrameLayout>
<!-- Padding asymmetry (16dp top vs 18dp bottom) is necessary to move text 1dp up according to
the Material spec. See https://crbug.com/701221#c37. -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:minHeight="56dp"
android:orientation="vertical"
android:paddingBottom="18dp"
android:paddingTop="16dp">
<TextView
android:id="@android:id/title"
style="@style/PreferenceTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@android:id/summary"
style="@style/PreferenceSummary"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<ImageView
android:id="@+id/alert_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/accessibility_account_management_row_account_error"
android:src="@drawable/ic_error"
android:visibility="gone"/>
</LinearLayout>