Popularity
0.5
Growing
Activity
5.6
Growing
4
1
0

Description

This lightweight Android library provides the most common licenses in formatted and plain text (as Spanned object) for easy use.

I'm still a student so the progress might not be as fast as on other projects. I'm happy about contributions!

Programming language: HTML
License: Apache License 2.0

Licenses Library alternatives and similar packages

Based on the "Kotlin" category.
Alternatively, view Licenses Library alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Licenses Library or a related project?

Add another 'Kotlin' Package

README

Android Licenses Library

API HJitpack last commit license


About this project

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.

Feature

providing you the most common licenses in formatted and plain text form as Spanned objects

How to use

1. Implementation

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'
}

2. Initialize AndroidLicenses

AndroidLicenses.init(applicationContext)

3. Get Spanned Object

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
  • MIT / MIT_PLAIN
textView.setText(AndroidLicenses.get(AndroidLicenses.CC_BY_SA_4_0)

Screenshots

Only the shown text belongs to the library, the ui is implemented in the sample app to showcase the Spanned objects.

Contribute

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.

Thanks

Special thanks to reddit user jderp7 for contributing completely reworked library code, which was commited by me in THIS COMMIT.

Apps / Libraries using this library

If you want to add an app/library here, just open a new issue / PR.

Click here to see the list About Icons Library by Cyb3rko

License

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](LICENSE)


*Note that all licence references and agreements mentioned in the Licenses Library README section above are relevant to that project's source code only.