Skip to content

fix: unified tab ui.#208

Open
swedishfrenchpress wants to merge 16 commits intofeat/bip321-urifrom
feat/bip321-uri-tab-ui-fix
Open

fix: unified tab ui.#208
swedishfrenchpress wants to merge 16 commits intofeat/bip321-urifrom
feat/bip321-uri-tab-ui-fix

Conversation

@swedishfrenchpress
Copy link
Collaborator

refactor payment tabs into a proper segmented control

previously each tab had an icon and a text label, but only one was visible at a time — selecting a tab hid the icon and showed the text. this caused two problems: the container width kept changing (labels are wider than icons), and the LayoutTransition.CHANGING we were using to smooth that over was fighting the layout on every tap.

what changed:

  • swapped the outer LinearLayout for a FrameLayout so we can layer a sliding View (the pill indicator) behind the tab row
  • tabs are now layout_weight=1 so they're equal width and the pill width is constant — only translationX needs to animate
  • ObjectAnimator on translationX (250ms, FastOutSlowInInterpolator) replaces the background resource swapping
  • ArgbEvaluator crossfades text colors between white and secondary gray
  • added an isLaidOut guard + tabContainer.post {} so the indicator is positioned correctly before any tab selection fires
  • removed all the icon views and visibility toggling — labels are always visible

container is now fixed width (0dp constrained with 32dp margins) so it never shifts.

unified-example.mp4

a1denvalu3 and others added 16 commits March 7, 2026 09:33
- Update CDK to 0.15.2-rc.0 to access `toBech32String` for NUT-26 encoded payment requests.
- Add 'Unified' tab alongside Cashu and Lightning tabs. Unselected tabs now visually shrink down to just display their respective icons.
- Simplify WebSocket listeners logic to always fetch both Cashu and Lightning payment updates simultaneously in the background.
- Construct unified BIP21 URI combining `creq=` and `lightning=` parameters when generating the Unified QR Code and supplying the Unified HCE NDEF tag.
- Apply smooth LayoutTransitions when toggling tabs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants