Commit Graph
126 Commits
Author SHA1 Message Date
Serg 62575a9e0b [Android] Show loading state in Origin preferences during post-purchase credential fetch (#34955)
* [Android] Show loading state in Origin preferences during post-purchase credential fetch

When a Brave Origin purchase is completed, there is a delay while the
receipt is passed from Play Store to the SKUs SDK via
fetchOrderCredentials. During this time, the Origin preferences screen
opens but credentials aren't ready yet.

- Disable all toggles and clickable preferences until
  fetchOrderCredentials completes
- Show a snackbar with "Disabling features" spinner instead of
  "Restart now" during the credential fetch
- On success, re-enable preferences and transition to "Restart now"
- On failure, close the preferences screen
- Always show restart snackbar on toggle change regardless of
  setPolicyValue result, since failure means a restart is needed
- Remove duplicate color definitions (schemes_primary_fixed_dim,
  schemes_on_primary_fixed, semantic_text_secondary,
  semantic_text_tertiary) that already exist in nala tokens

Resolves: https://github.com/brave/brave-browser/issues/53915
2026-03-25 15:54:01 +01:00
samartnik afb83224c9 [Android] UI preparation for custom search engines (#34890)
This PR is only prepares UI and strings, the main implementation will be done separately in the context of brave/brave-browser#21837
2026-03-23 15:33:09 -04:00
Simone Arpe 3f35655f1d Implement new layout for widget search promo panel (#34207)
Implements new layout for widget search promo panel and introduces better handling of activity recreations and configuration changes to redraw the widget search promo panel with correct theme (day/night) and proper position.

Other notable enhancements:

- Tweak tablet margins to better frame the onboarding cards on foldable devices after initial review with the design team.
- Fix post-FRE intent and delay activity to avoid a glitch on foldable devices by following the same strategy applied upstream.
- Accessibility: include content descriptions for widget search promo panel images.
- Nala: include new drawables from Nala tokens.
- Append new source android-widget for all searches made from the widget.
- Implement tests to verify new source android-widget.
2026-02-27 13:45:17 +01:00
Jay Harris 2a3434f0f3 [Nala]: Add Android color tokens (#34106)
* [Nala]: Add color tokens on Android

* [Nala]: Convert some color tokens over to Nala as PoC
2026-02-24 22:40:52 +00:00
Simone Arpe 8439975265 Implement tablet layouts for new onboarding flow (#33936)
Implements tablet layouts for new onboarding flow study following Figma design.
2026-02-17 14:26:37 +01:00
Serg fc1c6e3181 [Android Origin] Update Android preferences UI and add restart snackbar (#33867)
Redesign the Origin preferences screen: add a custom restart
snackbar with dismiss button shown on toggle changes, split then
description into styled title/body/note sections, and rename
the bottom section from Subscription to Purchase.

Resolves: https://github.com/brave/brave-browser/issues/52774
2026-02-12 00:36:30 +00:00
Simone Arpe 59c4389a4b New onboarding flow study (smartphones and small screens) (#33521)
Updates the Day Zero onboarding experience on smartphones and small screen devices to a multi‑step, horizontally advancing flow driven by CTA buttons.
It introduces distinct layouts per step, a pager animation helper, and updates onboarding logic to support a scalable, multi‑step sequence with minimal duplication.

Tablet support is intentionally out of scope and will be handled in a separate PR.
2026-02-06 12:13:01 +01:00
samartnik 5edc5d977f [Android][Large Screen] Minor accessibility fixes for NTP (#33497) 2026-01-29 13:27:16 -05:00
samartnik d34037fa36 [Android][Large Screen] Add highlight for Brave News options (#33463) 2026-01-28 12:02:05 -05:00
Oliver 0bf55f3da0 [Android] Update light/dark colours from Nala XML definitions (#31329)
This change has been produced using a Ruby script that implements the
following logic:

1. For each <color> tag in the destination, try to find one in the
   source with the same name
2. If found, update the destination tag with the colour from the source
   tag
3. If not found, do nothing and move onto the next tag.
4. Tags that exist in the source but not the destination are ignored.

Currently, some tags exist in the destination XML that are missing from
the source and also vice versa.

Once this has been resolved, we should be able to delete the files in
this diff and move to simply copying the generated XML files straight
out of brave/leo.

Additionally, a small change has been made to the Brave Sync "Add New
Device" button to use a Nala-defined colour rather than being hard-coded
to white.

Closes brave/brave-browser#49143
2025-09-30 23:34:24 +02:00
Kevin Smith 7f6dbf689e [Rewards] Remove unused Rewards UI on Android (#30900) 2025-09-25 16:31:12 -04:00
samartnik f536ed9c59 [Android] Initial integration of quick shortcut button (#30242)
* [Android] Initial integration of quick shortcut button

- Adds flag for quick shortcut (disabled until all Brave items are available)
- Makes parity with options available with the upstream
- Visual and UI fixes

* Moves flag under Android guards
2025-07-25 06:57:22 -04:00
Serg 355b6dde6f Search widget: Set color scheme to use material design (#29569)
The search widget needs to have better alignment with Material colors.
It is important for it to feel like it is integrated to the OS.
Resolves: https://github.com/brave/brave-browser/issues/46537
2025-06-16 08:52:14 -04:00
Deep Pandya 2b756daa09 Android onboarding variants (#28426)
* Add support for diferent variants

* Remove omnibox highlight which shows up right after onboarding

* Add different variants function

* Add search widget promo on NTP

* Add notification permission changes

* Update widget promo UI

* Update wdp check

Resolve presubmit issue
2025-04-03 10:52:03 -04:00
Artem Samoilenko 2e7944d3e9 [Android] Update colors for Address bar setting and empty state icons 2025-03-31 14:39:09 -04:00
Deep Pandya 86e6934b52 Remove search engine onboarding (#28230)
* Remove search engine onboarding

* Remove onUrlFocusChange callback
2025-03-21 00:15:47 -04:00
Artem Samoilenko eedeae5ab2 [Android] Clean up modern_grey colors
Chromium change:
https://chromium.googlesource.com/chromium/src/+/e99dac41a65779af4bfb8a15cde443478f51cc2f

[clank-q4-fixit] Clean up modern_grey colors pt 2

Bug: 40910276
2025-01-27 09:41:36 -05:00
deeppandya f09c28a697 Add dark image res
Update bg color for the dialog
2024-12-18 09:36:36 -07:00
deeppandya 2fa0bb4e62 Remove commented colors as it's not needed 2024-11-13 10:07:39 -05:00
deeppandya 179618f779 Change quick search engine background to match with url bar color 2024-11-13 09:50:20 -05:00
deeppandya affec58382 Resolve order issue with MAP
Resolve keyboard height issue

Update icons for bing and startpage

Update existing UI
2024-11-06 11:18:19 -05:00
deeppandya 3fcd34edcd Update quick search engines view 2024-11-06 11:18:11 -05:00
deeppandya 5274ff61ed Add UI changes for selected server selection android 2024-09-06 03:23:14 +05:30
deeppandya 8c430eb8f0 Initial changes for UI
Update vpn server selecton activity UI
2024-09-06 03:22:11 +05:30
Simone Arpe 6b242e419c (Wallet) Implement recovery screens (#24943)
Implements new layouts and new logic for recovery screens.

1. The recovery phrase is shown when a new Wallet is created and the UI is presented with a blurred component that will be unblurred only upon user confirmation.

2. The recovery phrase verification is now in three steps and will ask to confirm three words picked at a random position.
For security reasons these steps won't allow back navigation and skipping them will consider the backup process as not completed, so the user will have the option to complete the verification later on.

3. The new Wallet restoration screen is the most complex screen of this PR. It accepts a mnemonic phrase made by 12 or 24 words. It can be copied over from clipboard, spit, formatted and pasted nicely in each edit text. The edit text items have been customized to accept the pasted text (See `PasteEditText` component). The layout can switch from 12 and 24 words, and also has a button to mask and unmask the words. The continue button is responsive and is enabled ONLY when all the items have been filled.
2024-08-14 15:09:23 +02:00
AlexeyBarabash 42194fc146 Fixed toolbar background color
Related Chromium change:
https://source.chromium.org/chromium/chromium/src/+/7c065994b4014bb6e352c90c1df8e4e1a2bc1e83

[SurfacePolish][CleanUp] Clean up surface polish code related to toolbar and real omnibox appearance.

	This CL cleans up code related to the toolbar and real omnibox
	appearance, including color, icon background, hint text typeface, and
	button end margin. This CL does not include the change in animation.
	Additionally, it makes a small adjustment to the size of the Google icon
	background in the real omnibox.
	Here is a comparison:
	Original: https://drive.google.com/file/d/1ZAu3svqTXe0bjABFgudgv8XnZNO_fph6/view?usp=sharing&resourcekey=0-Rxyvdlg9na3n-M1Jd9VNKQ
	After this CL:
	https://drive.google.com/file/d/1zBX-rTgUz2VNHwHp9NMBIaVklx-VSaol/view?usp=sharing&resourcekey=0--L7FH_jIss1VFlauBEMFVQ

	Bug: 331667743
	Change-Id: I863d9e333fe21509f92f05da73a13d3070fc3bfe
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5688899
2024-08-07 21:31:50 -04:00
AlexeyBarabash dbc3626698 Fix orange opaque address bar.
Set ToolbarPhone.mLocationBarBackgroundColorForNtp with non-opaque regular color.

Related Chromium change:
https://source.chromium.org/chromium/chromium/src/+/7c065994b4014bb6e352c90c1df8e4e1a2bc1e83

	[SurfacePolish][CleanUp] Clean up surface polish code related to toolbar and real omnibox appearance.

	This CL cleans up code related to the toolbar and real omnibox
	appearance, including color, icon background, hint text typeface, and
	button end margin. This CL does not include the change in animation.
	Additionally, it makes a small adjustment to the size of the Google icon
	background in the real omnibox.
	Here is a comparison:
	Original: https://drive.google.com/file/d/1ZAu3svqTXe0bjABFgudgv8XnZNO_fph6/view?usp=sharing&resourcekey=0-Rxyvdlg9na3n-M1Jd9VNKQ
	After this CL:
	https://drive.google.com/file/d/1zBX-rTgUz2VNHwHp9NMBIaVklx-VSaol/view?usp=sharing&resourcekey=0--L7FH_jIss1VFlauBEMFVQ

	Bug: 331667743
	Change-Id: I863d9e333fe21509f92f05da73a13d3070fc3bfe
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5688899
2024-08-07 21:31:43 -04:00
AlexeyBarabashandDeep Pandya 9c96ab17a5 Android - Display Sync code expiry when showing the pairing codes (#23051)
* Android - Display Sync code expiry when showing the pairing codes

fixes brave/brave-browser#37725

Co-authored-by: Deep Pandya <5146988+deeppandya@users.noreply.github.com>
2024-06-20 16:05:10 +03:00
Simone Arpe 4667e2e2c7 (Wallet) Tweak onboarding layouts and styles following updated Figma design (#24063)
* Fix network selection default networks
* Improve layouts and text styles based on updated Figma design
* Replace color name with Nala color name
2024-06-12 19:01:32 +02:00
Artem Samoilenko ad4a25bc55 [Android] Move TabContentManager to chrome/browser/tab_ui
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/8f9443470e9356596b45f0ca9ca929f680a71937

[Refactor] Move TabContentManager to chrome/browser/tab_ui.

In this CL, move the following classes to chrome/browser/tab_ui:
- ThumbnailProvider;
- TabContentManager;
- InvalidationAwareThumbnailProvider.
This continue to remove dependencies of chrome_java in
SingleTabSwitcherOnNtpMediator. This CL contains mechanical changes
only.

Bug: 330574966
2024-05-03 16:54:06 -04:00
Simone Arpe 698a7acbbe (Wallet) Implement new unlock screen to access Wallet (#23338)
* Refactor clear clipboard methods and add Javadocs
* Fix null pointer exception when the app is in background
* Remove redundant API check
* Remove unused interface methods
* Perform small refactoring to improve readability
* Remove unused tag
* Move animation drawable to parent class
* Implement custom style for input edit text component
* Implement biometric button
* Rename color using Nala naming convention
* Rename colors following Nala naming convention
2024-05-03 14:36:41 +02:00
Deep Pandya eae9f70b9c Vpn always on & kill switch android (#23293)
* Add UI for always on feature

Add roboto flex font

* Add always on tutorial image resources with tab selectors

* Update UI chanegs for always on tutorial

* Add license headers for resources

Update text change with license header
2024-05-01 11:55:05 -04:00
deeppandya 5ffc5234f8 Remove brave://rewards page notification permission as it's confusing and unnecessary 2024-03-01 11:38:16 -05:00
Simone Arpe 91d7e1c852 (Wallet) Remove Android unused code (#22119)
* Remove Nft details

* Remove AddAssetsActivity

* Remove PortfolioFragment

* Remove MarketFragment

* Remove AccountsFragment

* Remove TransactionsFragment

* Remove CryptoFragmentPagerAdapter

* Remove AccountDetailActivity

* Remove AssetDetailActivity

* Remove AccountDetailsWithQrActivity

* Remove WalletNftAdapter

* Remove SwapBottomSheetDialogFragment

* Remove NetworkInfoPresenter

* Remove WebUiActivityType

* Remove MarketModel

* Remove UserAssetModel

* Remove PortfolioModel

* Remove TransactionsModel

* Remove PortfolioHelper

* Remove SmoothLineChartEquallySpaced

* Clean up AssetUtils

* Clean up TokenUtils

* Clean up Utils

* Clean up WalletConstants

* Clean up Validations

* Clean up WalletUtils

* Apply code formatting

* Remove AccountPrivateKeyActivity

* Refactor and rename WalletCoinAdapter to AccountSelectorRecyclerView

* Remove unused resources

* Improve method name
2024-02-20 11:26:52 +01:00
Simone Arpe be25b717e4 (Wallet) Implement onboarding initial screen and TOC screen (#21905)
Implements new initial onboarding screen and new terms of use screen.
2024-02-07 14:17:05 +01:00
Simone Arpe 9dc756f9c8 (Wallet) Tweak onboarding navigation controls (#21673)
* Perform minor improvements
* Add back and close icon to main layout
* Perform refactoring to OnNextPage interface
* Implement BaseWalletNextPageFragment that holds a reference to next page interface
* Refine Utils class
* Switch Wallet actions from int to enum type
* Move UnlockWalletFragment outside onboarding package
* Rename onboarding fragments
* Add Javadocs and code comments
2024-01-24 11:13:01 +01:00
Deep Pandya 3f8aa31c97 Merge pull request #21458 from brave/vpn_country_selection_menu_android
Vpn country selection menu android
2024-01-17 10:35:28 -05:00
Deep Pandya e093626b00 Playlist android (#21041)
* Update onboarding

Add exoplayer hls dependency

Add HLS support

Make changes for events

Refactor PlaylistOptionsEnum

Refactor logs

Remove unused imports

* Update playlist event behaviour

Remove unused imports after refactor

Address PR comments

* Add message for already added content in default playlist

* Add to playlist menu

Add to playlist prefrence

* Move first kotlin class for onboarding to brave core

Add whole kotlin module into brave core

Add required changes for custom datasource

* Add native worker changes for stream

Add initial work for bytes transfer

Changes to play from saved byte array

* Add HLS parsing

Update datasource

* Add playlist streaming mojom implementation

Add observer for playlist streaming

Add playlist streaming observer

Stream from downloading file

Remove test video activity

Remove custom datasource

Remove kotlin files

Initial work for partial download play

* Update soilution for downloading HLS content

* Add download service with progress notification

Add DownloadUtils functions for mp4

Add function for HLS downloading in DownloadUtils

Add changes for hls download in downloadutils

Update changes to file location for playlist item

Add download queue for HLS

Add hlsMediaPath field for android

Update hlsMediaPath after download

Update existing changes with hls file

add changes to donwload multiple HLS items

* Update changes to multiple downloads

Resolve rebase errors

Download progress update after rebase error resolution

Update streaming observer

Add new event callbacks in mojom

Update existing observer logic

* Migrate exoplayer deps with chromium

* Update UI changes to represent download state

Refactor to remove unused import and implementation

Remove auto save settings option

Update move/delete/share icons

Update filesize update

Hide cast button

Remove unused resources in kotlin module

Add patch to suppress lint for unstable api

Remove indirect deps

Remove unrelated code changes

Resolve presubmit errors

* Refactor HLS content generation

* Remove cast dependency

Refactor logs

* Update add media icons resource

Update player bottom sheet behaviour

Address PR comments

* Remove playlist warning dialog as it's irrelavent

Remove unnecessary flag check

* Add playlist stremaing class details

Reformat existing changes

Add mock data for hls file path

* Resolve rebase errors

Resolve presubmit checks

* Update player items on delete/reorder

* Allow delete while in progress

Made changes to delete while playing

* Add prefs to BravePreferencekeys

* Update string resources

Remove debug messages

Resolve presubmit error
2024-01-17 09:41:58 -05:00
deeppandya f39a7d80b5 Update VPN location menu item with flag
Update server selection behaviour from menu

Update server selection menu item

Add country flag

Update country selection icon tint

Update behaviour for country selection
2024-01-17 09:37:49 -05:00
Artem Samoilenko 49010a9c44 [Android] Minor color adjustments
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/ecebb05e61843b6b2b0f8dd1b66158c2a1c98583

SwitchMaterial to MaterialSwitch

Migrate the SwitchMaterial (GM2) into MaterialSwitch (GM3).

To mitigate the size increase for the MG3 switch, we are applying a 0.8 scale for the switch, while setting a bigger minHeight (60dp) in order to maintain the min touch garget size. This however brings the side effect of size could have a bigger height.

Another side effect of scaling is the text come with switch widget will be scaled too. This CL mitigate that by wrapping the switches in a linear layout and intercept the text being set in the resources.

With this migration, there are few gotchas this CL also addresses:
 - Migrate the UI using SwitchCompat into MaterialSwitch to keep the consistent look
 - Add the materialSwitchStyle to Base.Theme.BrowserUI to cooperate UIs that uses SwitchPreferenceCompat out side of SettingsActivity
 - Add themes to render tests that does not apply the theme themselves, so the switches on the goldens has the correct scale applied.

Bug: 1248590
2024-01-15 14:26:46 -05:00
deeppandya 116cdd414d Update vpn icon tint in settings 2023-12-22 09:49:12 -05:00
deeppandya 97bfe1bb5e Update vpn icon for light/dark mode 2023-11-30 14:51:40 -05:00
deeppandya 06fd7c037d Add logic to turn on the vpn based on timer
Update light/night theme

Update icons
2023-11-22 05:20:59 -05:00
Serg 88dd443003 Adds Reset Leo data preference on Android 2023-10-13 11:47:11 -04:00
Simone Arpe ec75711c56 (Wallet) Improve Wallet dark theme (#20465)
* Tweak primary text color and action bar background color

* Tweak chip selector colors

* Optimize text color attributes

* Network selector icon size

* Tweak Assets text view

* Apply new Wallet background color

* Tweak Wallet background color and toolbar background color

* Add divider lines below toolbar and above navigation bar

* Tweak bottom navigation view style and minor improvements

* Apply code formatting

* Remove duplicated style
2023-10-10 18:40:52 +02:00
Sujit 8f405437af Rewards tipping tablet UI 2023-10-05 18:16:31 +05:30
Pavneet Singh 5cc1421d7f Siwe android UI updates (#20293)
* Update error dialog to 2.0 design

* Update account and error dialog per 2.0

* Fix error dialog UI
2023-09-28 09:50:15 +05:30
Pavneet Singh 1de9f42545 Siwe 2.0 Sign panel and details dialog (#20168)
* implement SIWE 2.0 sign dialog

* Implement SIWE details section

* Use domain models

* Show origin

* Implement SIWE details dialog and formatting

* Update layout design

* Clean up

* Minor review changes

* Add spacing

* Add missing SIWE detail fields

* Fix item spacing

* Show resources and host in details dialog

* Fix formatting

* Remove host field
2023-09-25 19:33:05 +09:00
deeppandya 0053ecabfd Remove resources for cookie consent notices modal 2023-09-20 14:13:41 -04:00
Simone Arpe 6f5591994d Tweak portfolio UI and add option to show hidden NFTs (#19990) 2023-09-06 13:43:02 +02:00