openedx / openedx-app-android

The mobile app for Android for the Open EdX Platform.
Apache License 2.0
14 stars 19 forks source link

[Android] Move ProgramFragment Parameters from Constructor to newInstance Function #325

Closed PavloNetrebchuk closed 2 weeks ago

PavloNetrebchuk commented 1 month ago

We need to refactor the ProgramFragment class to move its parameters from the constructor to a newInstance function. This change will enhance code readability, improve maintainability, and align with best practices for fragment creation in Android development.

From To
Screenshot 2024-05-29 at 16 26 56 Screenshot 2024-05-29 at 16 29 04

Additionally, it's crucial to modify the getProgramFragmentInstance function in AppRouter.kt.

Screenshot 2024-05-29 at 16 42 52