Skip to content

Instantly share code, notes, and snippets.

@rahul-gill
Last active March 7, 2023 05:15
Show Gist options
  • Save rahul-gill/6700c366627a2c7007a07b96ff6c0785 to your computer and use it in GitHub Desktop.
Save rahul-gill/6700c366627a2c7007a07b96ff6c0785 to your computer and use it in GitHub Desktop.
GSoC '22 Report | The Mifos Initiative | Mifos Android UI library

Google Summer of Code 2022

Project - Mifos UI library for Android Apps

This project focused on implementing a UI library that will be consumed by Mifos Android apps(android-client, mifos-mobile, mobile-wallet) and implement new designs using it across the customer-facing apps providing a consistent and familiar look and feel.

Work Done

  • added common styles, size and padding values to the UI library
  • added lint rule in the library to enforce usage of these defined style only
  • updated core and UI dependencies of Android apps.
  • Made UI improvements in the 3 apps.
  • build a base for using compose in Android apps

UI library

  • pull requests
  • list of styles and values included in the ui library
  • added lint rules to enforce usage of these styles and values for example this layout file
     <Text
         android:layout_height="wrap_content"
         android:layout_width="match_parent"
         android:text="Heading: Account Summary"
         android:textSize="24sp"
         android:textColor="#000000"/>
    generates error
     .../demoApp/src/main/res/layout/tmp.xml:20: Error: Style attribute usage in layout detected [StyleAttributeUsageIssue from mifos]
         android:textSize="24sp"
         ~~~~~~~~~~~~~~~~~~~~~~~
    
     The full lint text report is located at:
       .../demoApp/build/intermediates/lint_intermediate_text_report/debug/lint-results-debug.txt
    
     Execution failed for task ':demoApp:lintDebug'.
     > Lint found errors in the project; aborting build.
    
  • published the library using Jitpack.
  • added a sample app containing preview of styles.

UI improvements and integration of UI library in apps

  • dependencies' upgrade
    • updated AGP, kotlin versions and replaced deprecated plugins with their successors.
    • updated UI dependencies
    • made changes required after dependencies' upgrade: removal of touch listener for recyler view item click listener, updating adapters of ListViews to support theming.
  • migrated styles from material2 to material 3
  • replaced styles and values with those from UI library
  • migrated widgets to newer material/androidx classes, for example
    • Spinners replaced with MaterialAutoCompleteTextViews
    • AppCompat or androidx versions of widgets to Material widgets
    • EditTexts replaced with TextInputLayout and TextInputEditText
    • updated date pickers with material versions
  • improved layouts, sizing and spacing of widgets in them. Detailed explaination is added in pull requests' description.
  • android-client pull requests
  • mobile-wallet pull requests
  • mifos-mobile pull requests

Path Ahead

It was an amazing experience working with the Mifos Initiative and I believe we achieved a lot during this GSoC journey but still, I think there's a lot of scope of improvements. On the UI side we can start using Jetpack Compose, its slot API and declarative approach can improve developer experience and make it easier to build reusable components. I've made an app based on android-client . I hope to continue working with the Mifos Initiative.

Conclusion

The Google Summer of Code journey with the Mifos Initiative has been pretty amazing and also challenging. I had a great time learning new things and collaborative work. I would like to thank Ed Cable for always being there ready to help me.

Thank You Regards Rahul Gill

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