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

Library introduces a heavy material-icons-extended as a dependency into the resulting APK #6

Closed
Nek-12 opened this issue Nov 8, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@Nek-12
Copy link

Nek-12 commented Nov 8, 2022

Including this as a dependency increases the resulting APK size by a significant margin and adds overhead for builds run with R8.
Material-icons-extended should not be included into the library because that dependency contains a lot of unused code

Proposed solution:
Copy the code of required icons directly into the source code of the library or provide a way for users to supply their own icons instead

@Nek-12 Nek-12 changed the title Library introduces huge material-icons-extended as a dependency into the resulting APK Library introduces a heavy material-icons-extended as a dependency into the resulting APK Nov 8, 2022
@maxkeppeler
Copy link
Owner

Agree! I doubt I will even need the icons for the lib, but more likely for the sample app.

@maxkeppeler maxkeppeler added the enhancement New feature or request label Nov 8, 2022
@Nek-12
Copy link
Author

Nek-12 commented Dec 3, 2022

Hello, any progress on this?

@maxkeppeler
Copy link
Owner

Working on a flexible solution where anyone can specify the style used for the icons, and only the specific icons would be included in the project. The dependency material-icons-extended is removed. I need a bit more time.

maxkeppeler added a commit that referenced this issue Dec 6, 2022
Removes the material-icons-extended dependency at the same time for the library.
@Nek-12
Copy link
Author

Nek-12 commented Dec 7, 2022

Hmmh, I see that LibIcons is an object and cannot be replaced when passing the config. Wouldn't it disallow icon customization beyond what's used in the library? I'd suggest passing a painter object as a parameter. I use icon fonts for example and they don't have an object I can pass, so I pass painters around.

@maxkeppeler
Copy link
Owner

The use-case view icons allow users to select any style they want, which can be seen as customization compared to before. When it comes to the views themselves, like the Option-Dialog/Option-View, anything can be passed to the icon that is displayed within the options. This uses the IconSource class, which accepts any input.

Is this level of customization really necessary? I personally feel like developers would at this point fork the project as they require specific changes.

@Nek-12
Copy link
Author

Nek-12 commented Dec 7, 2022

It's up to you at this point - whether you want to be opinionated or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants