-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Android][UPM] Add Cancel button to the Loading Modal
This CL adds a button to the Loading Modal Dialog that dismisses the dialog instantly as CANCELLED. The view is trivial and doesn't change after inflation. Therefore, this CL adds only integration tests instead of view tests. Since Handlers can't be mocked or overridden (because all post* methods are final), this CL adds a method to skip animations for tests. Screenshots are in the linked bug. Bug: 1318902 Change-Id: I732a17cd1e278152bbfc6142967010f5fce8beab Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3620381 Reviewed-by: Ioana Pandele <ioanap@chromium.org> Commit-Queue: Friedrich Horschig <fhorschig@chromium.org> Reviewed-by: Boris Sazonov <bsazonov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1001549}
- Loading branch information
Showing
8 changed files
with
271 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
chrome/browser/loading_modal/android/java/res/layout/loading_modal_button_bar.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright 2022 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. --> | ||
|
||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<org.chromium.ui.widget.ButtonCompat | ||
android:id="@+id/cancel_loading_modal" | ||
android:layout_gravity="center" | ||
android:layout_marginBottom="16dp" | ||
android:layout_height="wrap_content" | ||
android:layout_width="wrap_content" | ||
android:text="@string/password_generation_dialog_cancel_button" | ||
android:layout_centerHorizontal="true" | ||
style="@style/TextButton"/> | ||
|
||
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.