View which shows OSS licenses in assets.
- Create OSS license files File name is OSS name, file contents is license text.
- Save OSS license files in your
assets/license
directory
- Create
LicenseView
and add in yourActivity
orFragment
etc.
XML:
<team.birdhead.widget.LicenseView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
Java:
setContentView(new LicenseView(this));
Name | Description |
---|---|
path | Path of license files. If not set, read license directory. |
list_layout | Custom layout. It must have 1 ListView whose id is R.id.list . |
item_layout | Custom row layout in ListView . It must have 2 TextView s whose ids are R.id.title and R.id.message . |
Gradle:
repositories {
maven { url 'http://team-birdhead.github.io/maven' }
}
dependencies {
implementation 'team.birdhead.licenseview:licenseview:1.0.0'
}
Copyright 2016 alzybaad
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.