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

Center about icons and code optimizations #211

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Donnnno
Copy link
Contributor

@Donnnno Donnnno commented Jan 2, 2025

Found some suggestions while going through the project in Android Studio:

Fixed

  • Social icons are always centered
  • OnBackPressedCallback > OnBackPressedCallback
  • 'drawable.length() == 0' can be replaced with 'drawable.isEmpty()'
  • Statement lambda can be replaced with expression lambda
  • Explicit type argument String, Object can be replaced with <>
  • 'isConnected()' is deprecated

Found some other interesting things that might be worth looking at:

  • It will always be more efficient to use more specific change events if you can. Rely on notifyDataSetChanged as a last resort.
  • 'enablePendingPurchases()' is deprecated
  • getIdentifier is discouraged:
    Use of this function is discouraged because resource reflection makes it harder to perform build optimizations and compile-time verification of code. It is much more efficient to retrieve resources by identifier (e.g. R.foo.bar) than by name (e.g. getIdentifier("bar", "foo", null)).

Social icons are always centered
OnBackPressedCallback > OnBackPressedCallback
'drawable.length() == 0' can be replaced with 'drawable.isEmpty()'
Statement lambda can be replaced with expression lambda
Explicit type argument String, Object can be replaced with <>
'isConnected()' is deprecated
@Donnnno Donnnno changed the title Center about icons Center about icons and code optimizations Jan 2, 2025
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.

1 participant