Skip to content

Migration to Jetpack Compose #2483

Open

Description

@TheLastProject

Catima uses a lot of "legacy" tech. Java, Android XML. It's become very obvious Google is no longer committed to these technologies and is definitely not giving them the love they need anymore.

To ensure we can use Jetpack Compose, we will have to first migrate things to Kotlin and then Compose them slowly. We can, however, do this per-activity.

Help is very much appreciated here! If there's any part you are willing to do, please help! This is a huge undertaking!

Global changes

  • Get rid of custom colour support in Catima (this feature is rarely used and will add to the load of creating themes for the Compose code)
  • Create a Compose theme as similar as possible to the current theme (so the Compose and non-compose parts feel similar)

Per activity changes

MainActivity

AboutActivity

ManageGroupsActivity

ManageGroupActivity

LoyaltyCardViewActivity

  • Split into LoyaltyCardViewActivity and LoyaltyCardFullscreenViewActivity (to simplify the UI and card code)
  • Convert each of the new activities to Kotlin
  • Convert each of the new activities to Compose

LoyaltyCardEditActivity

ScanActivity

(May be quite a challenge with the zxing code)

BarcodeSelectorActivity

preferences.SettingsActivity

(This settings activity works strangely, do we need anything else to make this work?)

ImportExportActivity

CardShortcutConfigure

UCropWrapper

(Is this viable? Consider switching library)

Activity

  1. added
    severity: minor
    state: help wanted
    type: enhancement
    on May 3, 2025
  2. TheLastProject commented on Jun 24, 2025

    @TheLastProject
    MemberAuthor

    Marking this as good first issue because at least the Kotlin rewrites should be fairly straightforward to anyone with Kotlin knowledge.

    For Compose, maybe someone can help with the testing for #2489, but compose is step 2 anyway :)

    I do not recommend new contributors try to rewrite to Compose at this time (we first want to finish #2489 so we have the baseline for that).

  3. realjoni17 commented on Jul 18, 2025

    @realjoni17

    hi i want to contribute to this

  4. TheLastProject commented on Jul 18, 2025

    @TheLastProject
    MemberAuthor

    Feel free to do any of the Kotlin rewrites. Or, if you know Compose, setting up Compose tests for #2489 would be very helpful (then that can finally be finished 😃)

  5. davkenn commented on Aug 10, 2025

    @davkenn
    Contributor

    Could I work on converting LoyaltyCardEditActivity to Kotlin? I've been playing around with it and so far I've been fixing nullability, moving state to LoyaltyCardEditActivityViewModel and adding tests to more fully cover LoyaltyCardEditActivity. ETA: probably about a week.

  6. TheLastProject commented on Aug 10, 2025

    @TheLastProject
    MemberAuthor

    Sure @davkenn, thanks a lot for taking that on. That activity is quite a beast so looking forward to seeing the result (will probably take me a while to review though) :)

  7. PrathameshBhagat commented on Sep 14, 2025

    @PrathameshBhagat
    Contributor

    I'm new to kotlin ( may be a bit too new ) can I try migrating small individual files ?

    Like this class here:-
    https://github.com/CatimaLoyalty/Android/blob/main/app/src/main/java/protect/card_locker/ThirdPartyInfo.java

  8. TheLastProject commented on Sep 14, 2025

    @TheLastProject
    MemberAuthor

    @PrathameshBhagat Sure! The activities are the most important part as Google is caring less and less for Android XML and we need Kotlin to use Jetpack Compose, but the end goal is 100% Kotlin. So rewriting other Java files is helpful too!

  9. PrathameshBhagat commented on Sep 14, 2025

    @PrathameshBhagat
  10. TheLastProject commented on Sep 14, 2025

    @TheLastProject
    Author
  11. 6 remaining items

  12. TheLastProject commented on Oct 4, 2025

    @TheLastProject
    MemberAuthor

    @0spol sorry, I missed your message, my mailbox kinda exploded the day Hacktoberfest started, I am still not done with all the notifications I got 😅

    Changing the tests is not required, but would be nice. The main priority is the app itself, as the Kotlin rewrite is needed for Jetpack compose :)

  13. 0spol commented on Oct 4, 2025

    @0spol
    Contributor

    @TheLastProject Np, hope you had fun in Hacktoberfest. I will try to help with the migration 👍🏻

  14. amlwin commented on Oct 6, 2025

    @amlwin
    Contributor

    @TheLastProject , thz for last PR.
    Here i create a new PR(#2755) for Convert ImportExportActivity to Kotlin

  15. u7683648 commented on Oct 7, 2025

    @u7683648

    @TheLastProject Would it be okay if my group and I work on converting the ManageGroupActivity classes to Kotlin?

  16. Henry-ANU commented on Oct 7, 2025

    @Henry-ANU

    Hello. Would we be able to work on converting ManageGroupsActivity?

  17. TheLastProject commented on Oct 9, 2025

    @TheLastProject
    MemberAuthor

    @u7683648 @Henry-ANU Sorry for the late responses, very busy days (so I'm quite behind on messages). It seems someone else already picked those up (still need to review), so I guess those aren't really helpful anymore. But feel free to work on any Java file you find, no need to really ask permission (I understand wanting to announce it, but I guess it doesn't really stop others from working on the same files anyway)

  18. VeryUsual commented on Nov 9, 2025

    @VeryUsual
    Contributor
  19. pejfat08-rgb commented on Nov 11, 2025

    @pejfat08-rgb
  20. amlwin commented on Feb 12, 2026

    @amlwin
    Contributor
  21. NightShiftNexus commented on Mar 3, 2026

    @NightShiftNexus
    Contributor

    Can I start refactoring LoyaltyCardViewActivity? I have experience in mobile as a Flutter, Kotlin, and Swift developer, and I would like to help with the development of the application. Also I want to start participating in open source applications :)

  22. TheLastProject commented on Mar 3, 2026

    @TheLastProject
    MemberAuthor

    @NightShiftNexus Sure, though keep in mind that that activity is very complex. So it may be worth it to first split it into the View and FullscreenView activities to simplify the code :) Though I guess not a hard requirement :)

  23. NightShiftNexus commented on Mar 24, 2026

    @NightShiftNexus
    Contributor

    @NightShiftNexus Sure, though keep in mind that that activity is very complex. So it may be worth it to first split it into the View and FullscreenView activities to simplify the code :) Though I guess not a hard requirement :)

    Can u give me permission to push branches? I would like to push new branch and make pull request
    Sorry about permissions, my first PR in opensource project. Thanks for guide

  24. TheLastProject commented on Mar 24, 2026

    @TheLastProject
    MemberAuthor

    I'm not giving anyone permission to push branches directly on Catima for security reasons. You can create a fork and create a merge request from a branch pushed to your fork :)

  25. MohammedHazemDawood commented on Jul 23, 2026

    @MohammedHazemDawood

    can i contribute in this??

  26. TheLastProject commented on Jul 23, 2026

    @TheLastProject
    MemberAuthor

    @MohammedHazemDawood Sure! If you translate something to Kotlin, I'd like to request you do it in multiple commits with the first commit being a file rename (from .java to .kt) and the commit(s) after being your changes. That creates more readable diffs on GitHub

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueseverity: minorstate: help wantedtype: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions