Skip to content

feat: Support nav bar for legacy card browser - #21499

Open
ShaanNarendran wants to merge 1 commit into
ankidroid:mainfrom
ShaanNarendran:legacy-browser-bottom-nav
Open

feat: Support nav bar for legacy card browser#21499
ShaanNarendran wants to merge 1 commit into
ankidroid:mainfrom
ShaanNarendran:legacy-browser-bottom-nav

Conversation

@ShaanNarendran

@ShaanNarendran ShaanNarendran commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Purpose / Description

The PR is to allow the nav bar to work with the legacy/current card browser.

Fixes

  • For GSoC 2026: Deck Picker Redesign

Approach

We use a new layout that takes the current card browser toolbar from the card browser activity and adds that layout under the card browser fragment instead so the nav bar is compatible with it. Adding the existing toolbar directly would result in overlapping toolbars so making a new layout seemed to be the best option.

How Has This Been Tested?

Tested on emulator.

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@ShaanNarendran ShaanNarendran added the GSoC Pull requests authored by a Google Summer of Code participant [Candidate/Selected], for GSoC mentors label Aug 14, 2026
@ShaanNarendran
ShaanNarendran force-pushed the legacy-browser-bottom-nav branch from f7e6f2a to a2d37b6 Compare August 14, 2026 18:18
@david-allison

david-allison commented Aug 15, 2026

Copy link
Copy Markdown
Member

API 33 emulator (a2d37b6)

Screenshot 2026-08-15 at 04 05 25

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Aug 15, 2026
@ShaanNarendran

Copy link
Copy Markdown
Contributor Author

API 33 emulator (a2d37b6)

Screenshot 2026-08-15 at 04 05 25

ah it wasn't clashing for me, I can bring it down

@sanjaysargam

Copy link
Copy Markdown
Member

Maintain a proper spacing between status bar and toolbar
image

private fun withBottomNavigationEnabled(action: () -> Unit) {
private fun withBottomNavigationEnabled(action: () -> Unit) = withBooleanPreference(R.string.dev_bottom_nav_key, true, action)

private fun withBooleanPreference(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd extract this helper function to a shared location so that other test utilities can use this if similar patterns exists

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment why this layout exists and when it's used, for future maintainers

Something like :

<!--                                                                                                                                                                              
    Legacy card browser layout for embedded mode (e.g., bottom nav).                                                                                                                
    Includes the toolbar within the fragment since the host doesn't provide one.                                                                                                    
    Used when: dev_card_browser_search_view=false AND host is not CardBrowser activity.                                                                                             
  -->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSoC Pull requests authored by a Google Summer of Code participant [Candidate/Selected], for GSoC mentors Needs Author Reply Waiting for a reply from the original author Needs Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants