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

Load all vector drawables with AppCompat for consistency #4411

Merged

Conversation

cbeyls
Copy link
Contributor

@cbeyls cbeyls commented May 3, 2024

Currently some vector drawables are loaded using the AppCompat library and others are loaded using the framework.

This pull request uniformizes this to use AppCompat to load them all.

Other changes:

  • Set all compound drawables using relative positioning, since all XML layouts are also using relative positioning.
  • Remove unnecessary layer list drawable used to center R.drawable.ic_play_indicator icon and use ImageView.setForegroundGravity() instead.
  • Merge layers in toolbar icons ic_arrow_back_with_background and ic_more_with_background into a single vector drawable. Note that the AppCompat implementation of vector drawables is unable to load vector drawables inside layer-list drawables, so this change also makes these images compatible with older Android versions.

Note: technically, AppCompat will always delegate to the framework to load vector drawables on API 24+ which is the current minSDK version of the app. But at least this gives the option to lower the minSDK version in the future.

cbeyls added 4 commits May 3, 2024 15:24
Set all compound drawables using relative positioning.
# Conflicts:
#	app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java
#	app/src/main/java/com/keylesspalace/tusky/components/notifications/ReportNotificationViewHolder.kt
@connyduck
Copy link
Collaborator

please fix the merge conflict

# Conflicts:
#	app/src/main/java/com/keylesspalace/tusky/components/notifications/StatusNotificationViewHolder.kt
@connyduck connyduck merged commit 973ebd2 into tuskyapp:develop May 13, 2024
3 checks passed
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.

None yet

2 participants