Skip to content

Ui-Material (Deprecated)

The Material user interface will not receive further updates and is now deprecated. Consider using ui-material3 instead.

Setup

Add the dependency to your project

build.gradle.kts
dependencies {
    implementation("com.geekorum.aboutoss:ui-material:<latest-version>")
}

Usage

The OpenSourceDependenciesNavHost composable allows to display the licenses. It takes an OpenSourceLicensesViewModel that you can create with the LicenseInfoRepository of your choice.

val licenseInfoRepository = LicenseeLicenseInfoRepository()
val viewModel = viewModel<OpenSourceLicensesViewModel>(factory = OpenSourceLicensesViewModel.Factory(licenseInfoRepository))
OpenSourceDependenciesNavHost(
    openSourceLicensesViewModel = viewModel,
    navigateUp = {
        // close screen
    }
)

Android

The OpenSourceLicensesActivity is configured to work with the OSS Licenses Gradle Plugin You can launch the activity like this:

val intent = Intent(this, OpenSourceLicensesActivity::class.java)
startActivity(intent)

Desktop

On Desktop the OpenSourceLicensesWindow is configured to work with licensee. You can use it like this:

OpenSourceLicensesWindow(onCloseRequest = {
    // close window
})