Skip to content

Fixxed the layout of the LTC fiat picker#225

Merged
kcw-grunt merged 1 commit into
developfrom
fix/ltc-picker-layout
Apr 27, 2026
Merged

Fixxed the layout of the LTC fiat picker#225
kcw-grunt merged 1 commit into
developfrom
fix/ltc-picker-layout

Conversation

@kcw-grunt

@kcw-grunt kcw-grunt commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

📱 Description

This PR fixes the layout of the LTC fiat picker by reorganizing the display of fiat currency information and improving text sizing logic. The fiat amount and timestamp are now displayed above the wheel picker instead of below it, with adjusted initial font sizes (26.sp for fiat, 13.sp for timestamp) and improved overflow handling. The currency formatting logic has been refactored to use CurrencyDataGetter for consistent currency display across the app.

Platform

  • Android

🎯 Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🔧 Refactoring (code change that neither fixes a bug nor adds a feature)
  • 📚 Documentation update
  • 🎨 UI/UX improvement
  • ⚡ Performance improvement
  • 🧪 Test addition or improvement

📋 Changes

New Components Added

  • Added CurrencyDataGetter dependency to LTCPickerBentoViewModel for consistent currency formatting

Modifications

  • LTCPickerBentoScreen.kt:

    • Removed unused imports (TextAlign, delay)
    • Relocated fiat amount and timestamp Text composables from below to above the VerticalWheelPicker
    • Changed initial resizedFiatFontSize from 16.sp to 26.sp
    • Removed resizedCurrencyNameFontSize state variable (no longer needed)
    • Changed initial resizedAsOfTimestampFontSize from 12.sp to 13.sp
    • Removed hardcoded currency name display
    • Improved LaunchedEffect logic to use selectedIndex instead of Unit trigger with delay
    • Changed Spacer weight from 0.5f to 1f for better spacing distribution
  • LTCPickerBentoViewModel.kt:

    • Added CurrencyDataGetter as constructor dependency
    • Updated date formatter to use format "MMM dd, h:mm:ss a" (removed year)
    • Refactored onFiatRateSelected() to use CurrencyDataGetter.getFormattedCurrencyString() instead of simple string formatting
    • Added BigDecimal rounding logic using BWConstants.ROUNDING_MODE
    • Enhanced logging and error handling for null currency scenarios
    • Added import for CurrencyDataGetter and BigDecimal
  • LTCPickerBentoViewModelTests.kt:

    • Added mock for CurrencyDataGetter
    • Updated LTCPickerBentoViewModel instantiation to include new currencyDataGetter parameter
  • app/build.gradle.kts:

    • Incremented versionCode from 202506327 to 202506328
    • Added dependency: androidx.benchmark:benchmark-traceprocessor:1.4.1
  • gradle/libs.versions.toml:

    • Added new version reference: benchmark-traceprocessor = "1.4.1"
    • Added new library definition: androidx-benchmark-traceprocessor

Removals

  • Removed currency name Text composable that displayed state.selectedCurrency.name
  • Removed timestamp wrapper with stringResource() call; now displays raw state.formattedTimeStamp
  • Removed TextAlign.Start from timestamp text styling (uses default)
  • Removed 500ms delay from initial wheel picker scroll trigger

📊 Statistics

  • Additions: 70 lines
  • Deletions: 78 lines
  • Files Changed: 5
  • Commits: 1

🎯 Reviewers

@kcw-grunt, @josikie

Connected the selection to the picker
@kcw-grunt
kcw-grunt requested a review from josikie April 27, 2026 21:11
@kcw-grunt kcw-grunt self-assigned this Apr 27, 2026
@gruntsoftware gruntsoftware deleted a comment from github-actions Bot Apr 27, 2026
@kcw-grunt
kcw-grunt merged commit 6efad7a into develop Apr 27, 2026
3 of 4 checks passed
@kcw-grunt
kcw-grunt deleted the fix/ltc-picker-layout branch April 27, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant