Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62d2f4df authored by Evan Chen's avatar Evan Chen Committed by Android (Google) Code Review
Browse files

Merge "Fix touch target for Don't allow button" into udc-dev

parents 66b76bb7 4636ad84
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -18,8 +18,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <solid android:color="@android:color/transparent" />
    <corners android:topLeftRadius="16dp" android:topRightRadius="16dp"
             android:bottomLeftRadius="16dp" android:bottomRightRadius="16dp"/>
    <corners android:radius="24dp" />
    <stroke
        android:width="1dp"
        android:color="@android:color/system_accent1_600" />
+18 −9
Original line number Diff line number Diff line
@@ -123,21 +123,30 @@
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:gravity="bottom|end"
                android:orientation="vertical"
                android:layout_marginEnd="16dp"
                android:layout_marginBottom="16dp">

                <!-- Do NOT change the IDs of the buttons: they are referenced in CTS tests. -->
                <LinearLayout
                    android:id="@+id/negative_multiple_devices_layout"
                    android:layout_width="wrap_content"
                    android:layout_height="48dp"
                    android:gravity="center"
                    android:visibility="gone">

                    <Button
                        android:id="@+id/btn_negative_multiple_devices"
                        style="@style/NegativeButtonMultipleDevices"
                        android:textColor="?android:textColorPrimary"
                        android:visibility="gone"
                    android:layout_marginTop="12dp"
                    android:layout_marginBottom="12dp"
                        android:duplicateParentState="true"
                        android:clickable="false"
                        android:text="@string/consent_no" />

                </LinearLayout>

            </LinearLayout>

        </LinearLayout>
+2 −2
Original line number Diff line number Diff line
@@ -94,12 +94,12 @@

    <style name="NegativeButtonMultipleDevices"
           parent="@android:style/Widget.Material.Button.Colored">
        <item name="android:layout_width">100dp</item>
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">36dp</item>
        <item name="android:textAllCaps">false</item>
        <item name="android:textSize">14sp</item>
        <item name="android:textAppearance">@android:style/TextAppearance.DeviceDefault.Medium</item>
        <item name="android:background">@drawable/btn_negative_multiple_devices</item>
        <item name="android:textAppearance">@android:style/TextAppearance.DeviceDefault.Medium</item>
    </style>

    <style name="DeviceListBorder">
+6 −1
Original line number Diff line number Diff line
@@ -156,6 +156,9 @@ public class CompanionDeviceActivity extends FragmentActivity implements
    private ConstraintLayout mConstraintList;
    // Only present for self-managed association requests.
    private RelativeLayout mVendorHeader;
    // A linearLayout for mButtonNotAllowMultipleDevices, user will press this layout instead
    // of the button for accessibility.
    private LinearLayout mNotAllowMultipleDevicesLayout;

    // The recycler view is only shown for multiple-device regular association request, after
    // at least one matching device is found.
@@ -327,10 +330,11 @@ public class CompanionDeviceActivity extends FragmentActivity implements
        mButtonAllow = findViewById(R.id.btn_positive);
        mButtonNotAllow = findViewById(R.id.btn_negative);
        mButtonNotAllowMultipleDevices = findViewById(R.id.btn_negative_multiple_devices);
        mNotAllowMultipleDevicesLayout = findViewById(R.id.negative_multiple_devices_layout);

        mButtonAllow.setOnClickListener(this::onPositiveButtonClick);
        mButtonNotAllow.setOnClickListener(this::onNegativeButtonClick);
        mButtonNotAllowMultipleDevices.setOnClickListener(this::onNegativeButtonClick);
        mNotAllowMultipleDevicesLayout.setOnClickListener(this::onNegativeButtonClick);

        mVendorHeaderButton.setOnClickListener(this::onShowHelperDialog);

@@ -617,6 +621,7 @@ public class CompanionDeviceActivity extends FragmentActivity implements
        mButtonNotAllow.setVisibility(View.GONE);
        mDeviceListRecyclerView.setVisibility(View.VISIBLE);
        mButtonNotAllowMultipleDevices.setVisibility(View.VISIBLE);
        mNotAllowMultipleDevicesLayout.setVisibility(View.VISIBLE);
        mConstraintList.setVisibility(View.VISIBLE);
        mMultipleDeviceSpinner.setVisibility(View.VISIBLE);
    }