Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Convert "ui" package to Kotlin #11886

Merged
merged 10 commits into from Jun 6, 2023
Merged

Conversation

t895
Copy link
Contributor

@t895 t895 commented Jun 4, 2023

No description provided.

constructor(context: Context?) : this(context, null)

constructor(context: Context?, attrs: AttributeSet?) : this(context, attrs, 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use default values for the parameters instead of defining auxiliary constructors.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can remove the first constructor I have there just fine but even with my default parameters defined, the app crashes if you don't define the second constructor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait, I realized I could use the @JvmOverloads annotation to do exactly what you were thinking.

@t895 t895 force-pushed the kotlin-ui branch 2 times, most recently from e9b0ecd to 4ab1909 Compare June 5, 2023 19:42
@JosJuice JosJuice merged commit 36ca747 into dolphin-emu:master Jun 6, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants