Custom OssLicensesMenuActivity/component and/or full flexibility on display
See original GitHub issueProblem:
If the application theme in the manifest is, for example, a “no action bar theme”, the title can’t be displayed, since I can’t override the theme for OssLicensesMenuActivity
.
Please let us subclass the activity or at least set a theme on it.
A better option is making the list a component (fragment?) that I can include in my own activity.
The best solution, however, is to have also a method that returns a data structure (list of licenses and dependency-license mapping) so I can display it in my own way. For example, I might want to group by license, i.e., list distinct licenses and, on each item’s subtitle, list the packages using that same license. This would also solve #73, since we would be able to manually add licenses not related to gradle or maven. For example, resources like icons, etc, which may require a notice somewhere, could be added in my custom implementation of the activity. This is the best solution, since it gives us full flexibility on what info is shown and how.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:7
Top GitHub Comments
Why OssLicensesMenuActivity is final and can not be extended? That’s so annoying and take my time! Android is open, so let make it open! Please!
I can confirm that it’s not guaranteed in theory but pretty much in practice. Here’s a longer explanation: I was able to display a library with a proprietary license in an app using the OSS license plugin. These preconditions had to be met, however:
To include license information that can be picked up by the OSS plugin you would need to explicitly define the pom.xml metadata when publishing to the Maven repository as the native Gradle metadata format, https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html, does not support license information (at least it’s not clearly defined).