Based on: feature/floating-chat-stats-redesign
Target merge: refactor-huge-classes
| File | Changes |
|---|---|
ChatAdapter.kt |
Force white text + black shadow when High Visibility mode is active |
PlayerFragment.kt |
Use theme-aware surface color with adjustable alpha instead of hardcoded #80000000 |
ChatFragment.kt |
Fixed race condition where High Visibility styling persisted in sidebar chat after quick mode switch |
Key Fix: Text was previously "unreadable grey" - now explicitly sets color when overlay mode is active.
| File | Changes |
|---|---|
fragment_stats.xml |
Replaced hardcoded dark colors with ?attr/colorOnSurface, added 24dp rounded corners, proper elevation, Material icons |
DailyBarChartView.kt |
Theme-aware colors, uses StatsDataHelper for calculations |
HourlyHeatmapView.kt |
Theme-aware heatmap colors, extracted logic to helper |
CategoryPieChartView.kt |
Theme-aware pie chart, refactored for testability |
StatsFragment.kt |
Minor updates for theme compatibility |
New Drawables Added:
baseline_access_time_24.xmlbaseline_emoji_events_24.xmlbaseline_local_fire_department_24.xmlbaseline_pie_chart_24.xmlbaseline_schedule_24.xmlcircle_dot.xml
| File | Purpose |
|---|---|
StatsDataHelper.kt |
Pure Kotlin helper with calculation logic (no Android deps) |
StatsDataHelperTest.kt |
17 unit tests covering edge cases |
StatsDataHelper Functions:
normalizeHeatmapData()- Normalizes hourly data to 0.0-1.0calculateBarRatios()- Bar height calculations with min scaleinterpolateColor()- ARGB color interpolationcalculateDailyAverage()- Average from daily valuesformatSecondsToHoursMinutes()- Time formatting
- Created
layout_player_gesture_feedback.xml: Minimalist top-center feedback bar (white icon + progress bar on gradient). - Created
bg_gradient_top.xml: Gradient background for visibility. - Updated
fragment_player.xml: Replaced old "pill" overlay with new top bar.
- Created
PlayerSpeedDialog.kt&dialog_player_speed.xml:- Bottom sheet dialog matching target design.
- Large current speed display.
- Fine-tune slider with 0.05x steps.
- +/- stepper buttons.
- Preset chips (0.25x to 4.0x).
- Updated
PlayerFragment.ktto launch new dialog.
- Refactored
PlayerGestureListener.kt:- Horizontal Top 50%: Seek (Rewind/Fast Forward).
- Horizontal Bottom 50%: Playback Speed adjustment (0.05x increments).
- Vertical: Maintained Volume/Brightness with new visual feedback.
- Updated
PlayerGestureCallbackinterface to support new logic (seek,setPlaybackSpeed,getDuration). - Implemented
getDuration()inPlayerFragmentand overrides inExoPlayerFragment,Media3Fragment,MediaPlayerFragment. - Fix: Renamed
getVideoType()togetPlayerVideoType()in interface to avoid platform declaration clash withPlayerFragmentproperty.
- Livestream: Disables horizontal gestures (Seek/Speed).
- VoD/Clip/Offline: Enables all gestures.
app/src/main/java/com/github/andreyasadchy/xtra/ui/player/PlayerFragment.kt
app/src/main/java/com/github/andreyasadchy/xtra/ui/player/ExoPlayerFragment.kt
app/src/main/java/com/github/andreyasadchy/xtra/ui/player/Media3Fragment.kt
app/src/main/java/com/github/andreyasadchy/xtra/ui/player/MediaPlayerFragment.kt
app/src/main/java/com/github/andreyasadchy/xtra/ui/player/PlayerGestureListener.kt
app/src/main/java/com/github/andreyasadchy/xtra/ui/player/PlayerSpeedDialog.kt (NEW)
app/src/main/res/layout/fragment_player.xml
app/src/main/res/layout/layout_player_gesture_feedback.xml (NEW)
app/src/main/res/layout/dialog_player_speed.xml (NEW)
app/src/main/res/drawable/bg_gradient_top.xml (NEW)
app/src/main/res/drawable/baseline_add_black_24.xml (NEW)
app/src/main/res/drawable/baseline_remove_black_24.xml (NEW)
app/src/main/res/drawable/baseline_speed_black_24.xml (NEW)
app/src/main/res/values/strings.xml
- Build:
./gradlew assembleDebugSUCCESS (Fixed compilation issues with interface methods and resources) - APK:
app/build/outputs/apk/debug/app-debug.apkcreated.
- Test gesture feedback visibility (gradient background, text contrast).
- Verify split-screen touch zones are accurate.
- Test speed adjustment smoothness (0.05x increments).
- Verify seek gesture correctly shows current position / duration.
- Check Livestream vs VoD gesture enabling/disabling.
Last updated: Session end