<?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. -->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?android:attr/selectableItemBackground"
    android:gravity="center_vertical"
    android:orientation="horizontal"
    android:paddingTop="6dp"
    android:paddingBottom="6dp">

    <RadioButton
        android:id="@+id/radiobutton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="21dp"
        android:layout_marginEnd="16dp" />

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:orientation="vertical">
        <TextView
            android:id="@+id/description"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="17sp" />
        <TextView
            android:id="@+id/link"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="21dp" />
    </LinearLayout>

</LinearLayout>
<?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. -->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?android:attr/selectableItemBackground"
    android:gravity="center_vertical"
    android:orientation="horizontal"
    android:paddingTop="6dp"
    android:paddingBottom="6dp">

    <RadioButton
        android:id="@+id/radiobutton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="21dp"
        android:layout_marginEnd="16dp"
        android:background="@null"
        android:clickable="false" />

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:orientation="vertical">
        <TextView
            android:id="@+id/description"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="17sp" />
        <TextView
            android:id="@+id/link"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="21dp" />
    </LinearLayout>

</LinearLayout>
Fix UI glitch where multiple search engines appear to be selected.
Fix UI glitch where multiple search engines appear to be selected.

In the search engine picker, clicking on the radio button next to a
given search engine would select the radio button, without actually
selecting the search engine or deselecting the other radio buttons. The
fix is to make the RadioButton not clickable; its parent LinearLayout
handles the click events.

This also fixes a minor bug where the radio button background had its
own background that darkened slightly when pressed, in addition to the
LinearLayout's background that already darkens when pressed.

BUG=482829

Review URL: https://codereview.chromium.org/1113293002

Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#327859}
