Java Code Examples for de.psdev.licensesdialog.model.Notices#addNotice()

The following examples show how to use de.psdev.licensesdialog.model.Notices#addNotice() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GeneralPreferenceFragment.java    From Toutiao with Apache License 2.0 6 votes vote down vote up
private void createLicenseDialog() {
    Notices notices = new Notices();
    notices.addNotice(new Notice("PhotoView", "https://github.com/chrisbanes/PhotoView", "Copyright 2017 Chris Banes", new ApacheSoftwareLicense20()));
    notices.addNotice(new Notice("OkHttp", "https://github.com/square/okhttp", "Copyright 2016 Square, Inc.", new ApacheSoftwareLicense20()));
    notices.addNotice(new Notice("Gson", "https://github.com/google/gson", "Copyright 2008 Google Inc.", new ApacheSoftwareLicense20()));
    notices.addNotice(new Notice("Glide", "https://github.com/bumptech/glide", "Sam Judd - @sjudd on GitHub, @samajudd on Twitter", new ApacheSoftwareLicense20()));
    notices.addNotice(new Notice("Stetho", "https://github.com/facebook/stetho", "Copyright (c) 2015, Facebook, Inc. All rights reserved.", new BSD3ClauseLicense()));
    notices.addNotice(new Notice("PersistentCookieJar", "https://github.com/franmontiel/PersistentCookieJar", "Copyright 2016 Francisco José Montiel Navarro", new ApacheSoftwareLicense20()));
    notices.addNotice(new Notice("jsoup", "https://jsoup.org", "Copyright © 2009 - 2016 Jonathan Hedley ([email protected])", new MITLicense()));

    new LicensesDialog.Builder(context)
            .setNotices(notices)
            .setIncludeOwnLicense(true)
            .build()
            .show();
}
 
Example 2
Source File: PBAboutActivity.java    From client-android with GNU General Public License v2.0 6 votes vote down vote up
public void clickOnOpenSourceLicenses(final View view) throws Exception {
    final Notices notices = new Notices();
    notices.addNotice(new Notice(
            "Android v7 Support Libraries",
            "https://developer.android.com/topic/libraries/support-library/features.html#v7",
            "Copyright (C) 2012 The Android Open Source Project",
            new ApacheSoftwareLicense20()));
    notices.addNotice(new Notice(
            "LicensesDialog",
            "http://psdev.de",
            "Copyright 2013 Philip Schiffer <[email protected]>",
            new ApacheSoftwareLicense20()));
    notices.addNotice(new Notice(
            "OkHttp",
            "http://square.github.io/okhttp/",
            "Copyright 2016 Square, Inc.",
            new ApacheSoftwareLicense20()));

    new LicensesDialog.Builder(this)
            .setNotices(notices)
            .build()
            .show();
}
 
Example 3
Source File: NoticesXmlParser.java    From LicensesDialog with Apache License 2.0 6 votes vote down vote up
private static Notices parse(final XmlPullParser parser) throws IOException, XmlPullParserException {
    final Notices notices = new Notices();
    parser.require(XmlPullParser.START_TAG, null, "notices");
    while (parser.next() != XmlPullParser.END_TAG) {
        if (parser.getEventType() != XmlPullParser.START_TAG) {
            continue;
        }
        final String name = parser.getName();
        // Starts by looking for the entry tag
        if ("notice".equals(name)) {
            notices.addNotice(readNotice(parser));
        } else {
            skip(parser);
        }
    }
    return notices;
}
 
Example 4
Source File: AboutAppActivity.java    From ForceDoze with GNU General Public License v3.0 5 votes vote down vote up
public void showLicences(View v) {
    final Notices notices = new Notices();
    notices.addNotice(new Notice("Material Dialogs", "https://github.com/afollestad/material-dialogs", "Aidan Michael Follestad", new MITLicense()));
    notices.addNotice(new Notice("libsuperuser", "https://github.com/Chainfire/libsuperuser", "Chainfire", new ApacheSoftwareLicense20()));
    notices.addNotice(new Notice("Nanotasks", "https://github.com/fabiendevos/nanotasks", "Fabien Devos", new ApacheSoftwareLicense20()));
    notices.addNotice(new Notice("ProcessPhoenix", "https://github.com/JakeWharton/ProcessPhoenix", "Jake Wharton", new ApacheSoftwareLicense20()));
    notices.addNotice(new Notice("ckChangelog", "https://github.com/cketti/ckChangeLog", "cketti", new ApacheSoftwareLicense20()));
    notices.addNotice(new Notice("SimpleCustomTabs", "https://github.com/eliseomartelli/SimpleCustomTabs", "Eliseo Martelli", new MITLicense()));
    notices.addNotice(new Notice("MaterialList", "https://github.com/dexafree/MaterialList", "Dexafree", new MITLicense()));
    new LicensesDialog.Builder(this).setNotices(notices).setIncludeOwnLicense(true).build().show();
}
 
Example 5
Source File: MainActivity.java    From LicensesDialog with Apache License 2.0 5 votes vote down vote up
public void onMultipleProgrammaticClick(final View view) {
    final Notices notices = new Notices();
    notices.addNotice(new Notice("Test 1", "http://example.org", "Example Person", new ApacheSoftwareLicense20()));
    notices.addNotice(new Notice("Test 2", "http://example.org", "Example Person 2", new GnuLesserGeneralPublicLicense21()));

    new LicensesDialog.Builder(this)
        .setNotices(notices)
        .setIncludeOwnLicense(true)
        .build()
        .show();
}
 
Example 6
Source File: MainActivity.java    From LicensesDialog with Apache License 2.0 5 votes vote down vote up
public void onMultipleProgrammaticFragmentClick(final View view) {
    final Notices notices = new Notices();
    notices.addNotice(new Notice("Test 1", "http://example.org", "Example Person", new ApacheSoftwareLicense20()));
    notices.addNotice(new Notice("Test 2", "http://example.org", "Example Person 2", new GnuLesserGeneralPublicLicense21()));

    final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
        .setNotices(notices)
        .setShowFullLicenseText(false)
        .setIncludeOwnLicense(true)
        .build();

    fragment.show(getSupportFragmentManager(), null);
}
 
Example 7
Source File: FragmentAboutHelper.java    From Saiy-PS with GNU Affero General Public License v3.0 4 votes vote down vote up
/**
 * Get the license information we need to display
 *
 * @return the {@link Notices} object containing the required {@link Notice} elements
 */
public Notices getLicenses() {
    if (DEBUG) {
        MyLog.i(CLS_NAME, "getLicenses");
    }

    final Notices notices = new Notices();

    notices.addNotice(new Notice(getString(R.string.google_play_services),
            Constants.LICENSE_URL_GOOGLE_PLAY_SERVICES,
            getString(R.string.license_android_open_source),
            new ApacheSoftwareLicense20()));

    notices.addNotice(new Notice(getString(R.string.gson),
            Constants.LICENSE_URL_GSON,
            getString(R.string.license_google_inc),
            new ApacheSoftwareLicense20()));

    notices.addNotice(new Notice(getString(R.string.volley),
            Constants.LICENSE_URL_VOLLEY,
            getString(R.string.license_volley),
            new ApacheSoftwareLicense20()));

    notices.addNotice(new Notice(getString(R.string.two_forty_four),
            Constants.LICENSE_URL_TWO_FORTY_FOUR,
            getString(R.string.license_two_forty_four),
            new ApacheSoftwareLicense20()));

    notices.addNotice(new Notice(getString(R.string.speechutils),
            Constants.LICENSE_URL_KAAREL_KALJURAND,
            getString(R.string.license_kaarel_kaljurand),
            new ApacheSoftwareLicense20()));

    notices.addNotice(new Notice(getString(R.string.microsoft_translator),
            Constants.LICENSE_URL_MICROSOFT_TRANSLATOR,
            getString(R.string.license_microsoft_translator),
            new ApacheSoftwareLicense20()));

    notices.addNotice(new Notice(getString(R.string.apache_commons),
            Constants.LICENSE_URL_APACHE_COMMONS,
            getString(R.string.license_apache_commons),
            new ApacheSoftwareLicense20()));

    notices.addNotice(new Notice(getString(R.string.simmetrics),
            Constants.LICENSE_URL_SIMMETRICS,
            getString(R.string.license_simmetrics),
            new ApacheSoftwareLicense20()));

    notices.addNotice(new Notice(getString(R.string.nuance_speechkit),
            Constants.LICENSE_URL_NUANCE_SPEECHKIT,
            getString(R.string.license_nuance_speechkit),
            new BSD2ClauseLicense()));

    notices.addNotice(new Notice(getString(R.string.guava),
            Constants.LICENSE_URL_GUAVA,
            getString(R.string.license_guava),
            new ApacheSoftwareLicense20()));

    notices.addNotice(new Notice(getString(R.string.microsoft_cognitive),
            Constants.LICENSE_URL_MICROSOFT_COGNITIVE,
            getString(R.string.license_microsoft_cognitive),
            new MITLicense()));

    notices.addNotice(new Notice(getString(R.string.api_ai),
            Constants.LICENSE_URL_API_AI,
            getString(R.string.license_api_ai),
            new ApacheSoftwareLicense20()));

    notices.addNotice(new Notice(getString(R.string.simple_xml),
            Constants.LICENSE_URL_SIMPLE_XML,
            getString(R.string.license_simple_xml),
            new ApacheSoftwareLicense20()));

    notices.addNotice(new Notice(getString(R.string.material_icons),
            Constants.LICENSE_MATERIAL_ICONS,
            getString(R.string.license_material_icons),
            new ApacheSoftwareLicense20()));

    notices.addNotice(new Notice(getString(R.string.material_dialogs),
            Constants.LICENSE_MATERIAL_DIALOGS,
            getString(R.string.license_material_dialogs),
            new MITLicense()));

    notices.addNotice(new Notice(getString(R.string.pocketsphinx),
            Constants.LICENSE_POCKETSPHINX,
            getString(R.string.license_pocketsphinx),
            new BSD2ClauseLicense()));

    notices.addNotice(new Notice(getString(R.string.sound_bible),
            Constants.LICENSE_SOUND_BIBLE,
            getString(R.string.license_sound_bible),
            new CreativeCommonsAttributionShareAlike30Unported()));

    return notices;
}
 
Example 8
Source File: LicensesDialog.java    From LicensesDialog with Apache License 2.0 4 votes vote down vote up
private static Notices getSingleNoticeNotices(final Notice notice) {
    final Notices notices = new Notices();
    notices.addNotice(notice);
    return notices;
}
 
Example 9
Source File: LicensesDialogFragment.java    From LicensesDialog with Apache License 2.0 4 votes vote down vote up
public Builder setNotice(final Notice notice) {
    mNotices = new Notices();
    mNotices.addNotice(notice);
    return this;
}