<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:layout_alignParentBottom="true"
    style="?android:attr/background"
    android:id="@+id/linearLayout">

    <View
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:background="@null"/>

    <Button
        style="?android:attr/buttonStyle"
        android:background="@null"
        android:text="@string/cancel_button_label"
        android:id="@+id/cancel"
        android:textStyle="bold"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="@color/colorAccent"
        android:layout_margin="8dp"
        android:padding="4dp"/>

    <Button
        style="?android:attr/buttonStyle"
        android:background="@null"
        android:text="@string/choose_button_label"
        android:textStyle="bold"
        android:id="@+id/select"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="@color/colorAccent"
        android:layout_margin="8dp"
        android:padding="4dp"/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:layout_alignParentBottom="true"
    style="?android:attr/background"
    android:id="@+id/linearLayout">

    <View
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:background="@null"/>

    <Button
        style="?android:attr/buttonStyle"
        android:background="?android:selectableItemBackground"
        android:text="@string/cancel_button_label"
        android:id="@+id/cancel"
        android:textStyle="bold"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="@color/colorAccent"
        android:layout_margin="8dp"
        android:padding="4dp"/>

    <Button
        style="?android:attr/buttonStyle"
        android:background="?android:selectableItemBackground"
        android:text="@string/choose_button_label"
        android:textStyle="bold"
        android:id="@+id/select"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="@color/colorAccent"
        android:layout_margin="8dp"
        android:padding="4dp"/>
</LinearLayout>
Allow Cancel and Select buttons to be selectable by keyboard (e.g. for Android TV)
Allow Cancel and Select buttons to be selectable by keyboard (e.g. for Android TV)
