- About this project
- Features
- How to use
- Screenshots
- Contribute
- Thanks
- Apps using this library
- License
This lightweight Android library provides the most common licenses in formatted and plain text (as Spanned object) for easy use.
YOU CAN DOWNLOAD THE SAMPLE APP HERE
I'm still a student so the progress might not be as fast as on other projects.
providing you the most common licenses in formatted and plain text form as Spanned objects
Add this to your root build.gradle file:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
Then add this to your module's build.gradle file:
dependencies {
implementation 'com.github.cyb3rko:android-licenses-library:lastest-version'
}
AndroidLicenses.init(applicationContext)
The method get(licenseName)
needs the license name as a parameter and returns a Spanned object.
As the parameter you should use the predefined constants of AndroidLicenses
class (which also show, which licenses are currently available):
- APACHE_2_0 / APACHE_2_0_PLAIN
- CC_BY_3_0 / CC_BY_3_0_PLAIN
- CC_BY_4_0 / CC_BY_4_0_PLAIN
- CC_BY_SA_3_0 / CC_BY_SA_3_0_PLAIN
- CC_BY_SA_4_0 / CC_BY_SA_4_0_PLAIN
- CC_BY_NC_3_0 / CC_BY_NC_3_0_PLAIN
- CC_BY_NC_SA_3_0 / CC_BY_NC_SA_3_0_PLAIN
- MIT / MIT_PLAIN
textView.setText(AndroidLicenses.get(AndroidLicenses.CC_BY_SA_4_0)
Only the shown text belongs to the library, the ui is implemented in the sample app to showcase the Spanned objects.
Of course I'm happy about any kind of contribution.
Feel free to open issues for new features or bug reports. If you want to directly contribute code just open pull requests.
Special thanks to reddit user jderp7 for contributing completely reworked library code, which was commited by me in THIS COMMIT.
If you want to add an app/library here, just open a new issue / PR.
Copyright (C) 2020 Cyb3rKo
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.
For details see
License text