LicensesDialog is a simple, clean way to credit the open source software your app uses.
Create a list of Notices
:
val notices = listOf(
Notice("Library #1", ApacheLicense20, "www.url.com", Copyright("Author", 2018)),
Notice("Library #2", MitLicense, Copyright("Author", 2017))
)
Then show the LicensesDialog
:
LicensesDialog.Builder(context)
.setNotices(notices)
.show()
You can also check out the sample here.
Add JitPack to your list of repositories:
repositories {
maven { url 'https://jitpack.io' }
}
And add the library to your list of dependencies:
dependencies {
implementation 'com.github.colinrtwhite:licensesdialog:2.1.0'
}
This library is inspired by Licenses Dialog, however this library has the following improvements:
- Uses a
RecyclerView
instead of aWebView
for improved scrolling + rendering performance. - Unused license resources are stripped by Proguard.
- Opens links in Chrome Custom Tabs.
- Support for dark themed dialogs.
- Expandable license text.
Copyright 2020 Colin White
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.