Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@cjee21
Copy link
Collaborator

@cjee21 cjee21 commented Dec 25, 2025

This PR contains a suggested implementation for reworking the dark mode of the MediaInfo Android app.

Changes:

  • The dark mode now defaults to follow the OS setting while overriding it to force light or dark mode regardless of OS setting remains a premium feature.
  • The dark mode for report views now uses native dark mode/theme of WebView.

Reason:

  • Dark mode has become an essential feature in modern apps and OS
    • Android 16 QPR2 has a feature to force dark mode on all apps
      • This means MediaInfo app will be forced to follow OS dark mode if this setting is enabled even without subscription
      • However this results in non-optimal display compared to a proper dark mode
    • There have been complaints in reviews about dark mode being a paid feature in MediaInfo
    • Even Microsoft is now implementing dark mode for the remaining Windows 11 dialogs that not yet have dark versions
  • Android WebView has built-in dark mode and the HTML generated by MediaInfoLib now supports dark mode as well.
    • There is no need to manually override the colours of the report WebView anymore. Instead, using the built-in dark mode results in more consistent colours with the rest of the system.

Other changes in this PR not related to dark mode:

  • Migrate ReportDetailFragment menu to MenuProvider API
    • The previously used API has been deprecated for use in fragments. It is not yet deprecated for activities so the one in main activity is not yet migrated.
  • Migrate to Activity Result API for ReportDetailFragment and ReportListActivity
    • The previously used API is deprecated
    • Using new API results in less code needed too
  • Migrate to ViewPager2
  • Fix English grammar in subscription condition text.
  • Remove API checks that are no longer needed
    • MediaInfo app no longer supports older Android versions so these checks for older APIs are no longer necessary.
  • Resolve most warnings to reduce the amount of warnings in Android Studio.

These non-dark-mode-related changes (other than the English correction) should not have any visible changes to users of the app.

@JeromeMartinez
Copy link
Member

Thank you for this proposal, I am fine with it.

@cjee21 cjee21 force-pushed the Android branch 2 times, most recently from 94ef66c to a454133 Compare December 27, 2025 10:55
@cjee21
Copy link
Collaborator Author

cjee21 commented Dec 27, 2025

I have resolved almost all warnings in Android Studio. Also migrated a few deprecated APIs to newer APIs. Updated the first post accordingly.

What remains is usage of deprecated AsyncTask in ReportListActivity. Also should probably migrate the main menu to MenuProvider as well since already using that for the fragment menu. These two likely requires more work since that part of codes looks complex and has high risk of breaking functionality so I did not touch them.

@cjee21
Copy link
Collaborator Author

cjee21 commented Dec 27, 2025

Migrated the deprecated AsyncTask to Kotlin Coroutines as well. Not as difficult as I thought.

@cjee21
Copy link
Collaborator Author

cjee21 commented Dec 27, 2025

May want to review the warnings in .gradle files regarding deprecated 'proguard-android.txt' and some outdated dependencies. I did not touch those as they may break stuff or cause need to increase minSdkVersion.

@cjee21 cjee21 changed the title Android GUI: Dark mode rework + ReportDetailFragment improvements Android GUI: Dark mode rework + migrate deprecated APIs Dec 27, 2025
cjee21 added 3 commits January 5, 2026 22:44
Match the English version. `subscription_detail_text` is not supposed to contain format specifiers or `%PRICE%` placeholder. It will not be replaced and will cause build warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants