de.psdev.licensesdialog.LicensesDialog Java Examples
The following examples show how to use
de.psdev.licensesdialog.LicensesDialog.
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: FragmentAbout.java From Saiy-PS with GNU Affero General Public License v3.0 | 6 votes |
/** * Prepare the license information to show to the user */ private void prepareLicenses() { if (DEBUG) { MyLog.i(CLS_NAME, "prepareLicenses"); } AsyncTask.execute(new Runnable() { @Override public void run() { final Notices notices = helper.getLicenses(); FragmentAbout.this.getParentActivity().runOnUiThread(new Runnable() { @Override public void run() { new LicensesDialog.Builder(FragmentAbout.this.getParentActivity()) .setNotices(notices).setIncludeOwnLicense(true) .setShowFullLicenseText(false) .setCloseText(R.string.close).build().show(); } }); } }); }
Example #2
Source File: AboutActivity.java From Aegis with GNU General Public License v3.0 | 6 votes |
private void showLicenseDialog() { String stylesheet = getString(R.string.custom_notices_format_style); int backgroundColorResource = getCurrentTheme() == Theme.AMOLED ? R.attr.cardBackgroundFocused : R.attr.cardBackground; String backgroundColor = getThemeColorAsHex(backgroundColorResource); String textColor = getThemeColorAsHex(R.attr.primaryText); String licenseColor = getThemeColorAsHex(R.attr.cardBackgroundFocused); String linkColor = getThemeColorAsHex(R.attr.colorAccent); stylesheet = String.format(stylesheet, backgroundColor, textColor, licenseColor, linkColor); LicenseResolver.registerLicense(new GlideLicense()); new LicensesDialog.Builder(this) .setNotices(R.raw.notices) .setTitle(R.string.licenses) .setNoticesCssStyle(stylesheet) .setIncludeOwnLicense(true) .build() .show(); }
Example #3
Source File: PBAboutActivity.java From client-android with GNU General Public License v2.0 | 6 votes |
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 #4
Source File: AboutFragment.java From android-wallet-app with GNU General Public License v3.0 | 6 votes |
@OnClick(R.id.about_licenses) public void onAboutLicensesClick() { try { new LicensesDialog.Builder(getActivity()) .setNotices(R.raw.licenses) .setTitle(R.string.about_licenses) .setIncludeOwnLicense(true) .setCloseText(R.string.buttons_ok) .build() .showAppCompat(); } catch (AndroidRuntimeException e) { View contentView = getActivity().getWindow().getDecorView(); Snackbar snackbar = Snackbar.make(contentView, R.string.message_open_licenses_error, Snackbar.LENGTH_LONG); snackbar.setAction(R.string.message_install_web_view, v -> openPlayStore()); snackbar.show(); } }
Example #5
Source File: SettingsFragment.java From always-on-amoled with GNU General Public License v3.0 | 6 votes |
private void openSourceLicenses() { findPreference("open_source_licenses").setOnPreferenceClickListener(preference -> { Notices notices = new Notices(); notices.addNotice(new Notice("AppIntro", "https://github.com/PaoloRotolo/AppIntro", "Copyright 2015 Paolo Rotolo , Copyright 2016 Maximilian Narr", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("android-issue-reporter", "https://github.com/HeinrichReimer/android-issue-reporter", "", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("ButterKnife", "https://github.com/JakeWharton/butterknife", "Copyright 2013 Jake Wharton", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("Custom Analog Clock View", "https://github.com/rosenpin/custom-analog-clock-view", "Copyright (C) 2016 Tomer Rosenfeld", new GnuGeneralPublicLicense30())); notices.addNotice(new Notice("CircleImageView", "https://github.com/hdodenhof/CircleImageView", "Copyright 2014 - 2016 Henning Dodenhof", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("LicensesDialog", "https://github.com/PSDev/LicensesDialog", "", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("material-dialogs", "https://github.com/afollestad/material-dialogs", "Copyright (c) 2014-2016 Aidan Michael Follestad", new MITLicense())); new LicensesDialog.Builder(getActivity()) .setNotices(notices) .build() .show(); return true; }); }
Example #6
Source File: GeneralPreferenceFragment.java From Toutiao with Apache License 2.0 | 6 votes |
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 #7
Source File: MainActivity.java From LicensesDialog with Apache License 2.0 | 5 votes |
public void onCustomCssStyleClick(final View view) { new LicensesDialog.Builder(this) .setNotices(R.raw.notices) .setNoticesCssStyle(R.string.custom_notices_default_style) .build() .show(); }
Example #8
Source File: AboutActivity.java From Music-Player with GNU General Public License v3.0 | 5 votes |
private void showLicenseDialog() { new LicensesDialog.Builder(this) .setNotices(R.raw.notices) .setTitle(R.string.licenses) .setNoticesCssStyle(getString(R.string.license_dialog_style) .replace("{bg-color}", ThemeSingleton.get().darkTheme ? "424242" : "ffffff") .replace("{text-color}", ThemeSingleton.get().darkTheme ? "ffffff" : "000000") .replace("{license-bg-color}", ThemeSingleton.get().darkTheme ? "535353" : "eeeeee") ) .setIncludeOwnLicense(true) .build() .show(); }
Example #9
Source File: MainActivity.java From LicensesDialog with Apache License 2.0 | 5 votes |
public void onCustomThemeClick(final View view) { new LicensesDialog.Builder(this) .setNotices(R.raw.notices) .setIncludeOwnLicense(true) .setThemeResourceId(R.style.custom_theme) .setDividerColorId(R.color.custom_divider_color) .build() .show(); }
Example #10
Source File: MainActivity.java From LicensesDialog with Apache License 2.0 | 5 votes |
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 #11
Source File: MainActivity.java From LicensesDialog with Apache License 2.0 | 5 votes |
public void onMultipleIncludeOwnClick(final View view) { new LicensesDialog.Builder(this) .setNotices(R.raw.notices) .setIncludeOwnLicense(true) .build() .show(); }
Example #12
Source File: MainActivity.java From LicensesDialog with Apache License 2.0 | 5 votes |
public void onSingleClick(final View view) { final String name = "LicensesDialog"; final String url = "http://psdev.de"; final String copyright = "Copyright 2013 Philip Schiffer <[email protected]>"; final License license = new ApacheSoftwareLicense20(); final Notice notice = new Notice(name, url, copyright, license); new LicensesDialog.Builder(this) .setNotices(notice) .build() .show(); }
Example #13
Source File: SettingsActivity.java From wear-notify-for-reddit with Apache License 2.0 | 5 votes |
@Override public boolean onPreferenceClick(Preference preference) { final String preferenceKey = preference.getKey(); if (preferenceKey.equals(getString(R.string.prefs_key_open_source))) { new LicensesDialog(getActivity(), R.raw.open_source_notices, false, true).show(); return true; } else if (preferenceKey.equals(getString(R.string.prefs_key_account_info))) { if (mTokenStorage.isLoggedIn()) { mTokenStorage.clearToken(); initSummary(); toggleRedditSettings(); Toast.makeText(getActivity(), R.string.logged_out, Toast.LENGTH_SHORT).show(); } else { mRedditAccessTokenRequester.request(); } } else if (preferenceKey.equals(getString(R.string.prefs_key_sync_subreddits))) { if (mTokenStorage.isLoggedIn()) { syncSubreddits(); } else { Toast.makeText(getActivity(), R.string.you_need_to_sign_in_to_sync_subreddits, Toast.LENGTH_SHORT).show(); } } else if (preferenceKey.equals(getString(R.string.prefs_force_expire_token))) { mTokenStorage.forceExpireToken(); } else if (preferenceKey.equals(getString(R.string.prefs_force_refresh_now))) { mUserStorage.clearTimestamp(); mAlarmListener.sendWakefulWork(getActivity()); } else if (preferenceKey.equals(getString(R.string.prefs_key_actions_order))) { mAnalytics.sendEvent(Logger.LOG_EVENT_CUSTOMISE_ACTIONS, ""); } return false; }
Example #14
Source File: AboutActivity.java From Phonograph with GNU General Public License v3.0 | 5 votes |
private void showLicenseDialog() { new LicensesDialog.Builder(this) .setNotices(R.raw.notices) .setTitle(R.string.licenses) .setNoticesCssStyle(getString(R.string.license_dialog_style) .replace("{bg-color}", ThemeSingleton.get().darkTheme ? "424242" : "ffffff") .replace("{text-color}", ThemeSingleton.get().darkTheme ? "ffffff" : "000000") .replace("{license-bg-color}", ThemeSingleton.get().darkTheme ? "535353" : "eeeeee") ) .setIncludeOwnLicense(true) .build() .show(); }
Example #15
Source File: AboutActivity.java From NBAPlus with Apache License 2.0 | 5 votes |
public void onMultipleClick(final View view) { new LicensesDialog.Builder(this) .setNotices(R.raw.notices) .setIncludeOwnLicense(true) .build() .showAppCompat(); }
Example #16
Source File: AboutAppActivity.java From ForceDoze with GNU General Public License v3.0 | 5 votes |
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 #17
Source File: AboutActivity.java From VinylMusicPlayer with GNU General Public License v3.0 | 5 votes |
private void showLicenseDialog() { new LicensesDialog.Builder(this) .setNotices(R.raw.notices) .setTitle(R.string.licenses) .setNoticesCssStyle(getString(R.string.license_dialog_style) .replace("{bg-color}", ThemeSingleton.get().darkTheme ? "424242" : "ffffff") .replace("{text-color}", ThemeSingleton.get().darkTheme ? "ffffff" : "000000") .replace("{license-bg-color}", ThemeSingleton.get().darkTheme ? "535353" : "eeeeee") ) .setIncludeOwnLicense(true) .build() .show(); }
Example #18
Source File: SettingsActivity.java From RetroMusicPlayer with GNU General Public License v3.0 | 5 votes |
private void showLicenseDialog() { new LicensesDialog.Builder(getContext()).setNotices(R.raw.licences) .setTitle(R.string.licenses) .setNoticesCssStyle(getString(R.string.license_dialog_style) .replace("{bg-color}", ThemeSingleton.get().darkTheme ? "424242" : "ffffff") .replace("{text-color}", ThemeSingleton.get().darkTheme ? "ffffff" : "000000") .replace("{license-bg-color}", ThemeSingleton.get().darkTheme ? "535353" : "eeeeee")) .setIncludeOwnLicense(true).build().showAppCompat(); }
Example #19
Source File: MainActivity.java From MockSMS with Apache License 2.0 | 5 votes |
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_settings) { View topView = getLayoutInflater().inflate(R.layout.bad_quality_content, null); setupGrids(topView); new AlertDialog.Builder(MainActivity.this) .setTitle("Info") .setView(topView) .setPositiveButton("Back", null) .setNeutralButton("Open-Source Licenses", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Notices notices = new Notices(); notices.addNotice(new Notice("AppCompat", "https://developer.android.com/reference/android/support/v7/appcompat/package-summary", "Google", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("Android Support Library", "https://developer.android.com/topic/libraries/support-library/", "Google", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("MaterialDateTimePicker", "https://github.com/wdullaer/MaterialDateTimePicker", "wdullaer", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("PiracyChecker", "https://github.com/javiersantos/PiracyChecker", "javiersantos", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("LicensesDialog", "https://github.com/PSDev/LicensesDialog", "PSDev", new ApacheSoftwareLicense20())); new LicensesDialog.Builder(MainActivity.this) .setNotices(notices) .build() .show(); Toast.makeText(MainActivity.this, "Scroll Down", Toast.LENGTH_SHORT).show(); } }) .show(); return true; } return super.onOptionsItemSelected(item); }
Example #20
Source File: MainActivity.java From MockSMS with Apache License 2.0 | 5 votes |
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_settings) { new AlertDialog.Builder(MainActivity.this) .setTitle("Info") .setItems(new String[]{"Terms & Conditions", "Privacy Policy", "Disclaimer", "Help"}, (dialog, which) -> handleInfoItemClick(which)) .setPositiveButton("Back", null) .setNeutralButton("Open-Source Licenses", (dialog, which) -> { Notices notices = new Notices(); notices.addNotice(new Notice("AppCompat", "https://developer.android.com/reference/android/support/v7/appcompat/package-summary", "Google", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("Android Support Library", "https://developer.android.com/topic/libraries/support-library/", "Google", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("MaterialDateTimePicker", "https://github.com/wdullaer/MaterialDateTimePicker", "wdullaer", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("PiracyChecker", "https://github.com/javiersantos/PiracyChecker", "javiersantos", new ApacheSoftwareLicense20())); new LicensesDialog.Builder(MainActivity.this) .setNotices(notices) .setIncludeOwnLicense(true) .build() .show(); }) .show(); return true; } return super.onOptionsItemSelected(item); }
Example #21
Source File: AboutActivity.java From Orin with GNU General Public License v3.0 | 5 votes |
private void showLicenseDialog() { new LicensesDialog.Builder(this) .setNotices(R.raw.notices) .setTitle(R.string.licenses) .setNoticesCssStyle(getString(R.string.license_dialog_style) .replace("{bg-color}", ThemeSingleton.get().darkTheme ? "424242" : "ffffff") .replace("{text-color}", ThemeSingleton.get().darkTheme ? "ffffff" : "000000") .replace("{license-bg-color}", ThemeSingleton.get().darkTheme ? "535353" : "eeeeee") ) .setIncludeOwnLicense(true) .build() .showAppCompat(); }
Example #22
Source File: AboutFragment.java From fastnfitness with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.tab_about, container, false); //TextView pAppVersion = view.findViewById(R.id.app_version_textview); //pAppVersion.setText(); TODO get code version from Manifest TextView mpDBVersionTextView = view.findViewById(R.id.database_version); mpDBVersionTextView.setText(Integer.toString(DatabaseHelper.DATABASE_VERSION)); TextView mpMPAndroidChartTextView = view.findViewById(R.id.MPAndroidChart); TextView mpJavaCVSTextView = view.findViewById(R.id.javaCSV); TextView mpLicenseDialogTextView = view.findViewById(R.id.LicensesDialog); TextView mpChronometerTextView = view.findViewById(R.id.antoniomChronometer); TextView mpPagerSlidingTabStripTextView = view.findViewById(R.id.PagerSlidingTabStrip); TextView mpSmartTabLayoutTextView = view.findViewById(R.id.SmartTabLayout); TextView mpFlaticonTextView = view.findViewById(R.id.flaticonCredits); TextView mpFreepikView = view.findViewById(R.id.freepikCredits); TextView mpCircleProgressView = view.findViewById(R.id.CircleProgress); TextView mpCircularImageView = view.findViewById(R.id.CircularImageView); TextView mpkToast = view.findViewById(R.id.ktoast); TextView mpSweetAlertDialog = view.findViewById(R.id.SweetAlertDialog); TextView mpAndroidImageCropper = view.findViewById(R.id.AndroidImageCropper); TextView mpMaterialFavoriteButton = view.findViewById(R.id.MaterialFavoriteButton); mpMPAndroidChartTextView.setOnClickListener(clickLicense); mpJavaCVSTextView.setOnClickListener(clickLicense); mpLicenseDialogTextView.setOnClickListener(clickLicense); mpChronometerTextView.setOnClickListener(clickLicense); mpPagerSlidingTabStripTextView.setOnClickListener(clickLicense); mpSmartTabLayoutTextView.setOnClickListener(clickLicense); mpFlaticonTextView.setOnClickListener(clickLicense); mpFreepikView.setOnClickListener(clickLicense); mpCircleProgressView.setOnClickListener(clickLicense); mpCircularImageView.setOnClickListener(clickLicense); mpkToast.setOnClickListener(clickLicense); mpSweetAlertDialog.setOnClickListener(clickLicense); mpAndroidImageCropper.setOnClickListener(clickLicense); mpMaterialFavoriteButton.setOnClickListener(clickLicense); // Inflate the layout for this fragment return view; }
Example #23
Source File: SettingsFragment.java From Sky31Radio with Apache License 2.0 | 4 votes |
private void openLicenseDialog(){ new LicensesDialog.Builder(getActivity()) .setNotices(R.raw.notices) .build() .show(); }
Example #24
Source File: AboutActivity.java From TwistyTimer with GNU General Public License v3.0 | 4 votes |
@Override public void onClick(View view) { switch (view.getId()) { case R.id.feedbackButton: Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:" + "[email protected]")); emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Feedback"); startActivity(Intent.createChooser(emailIntent, getString(R.string.send_email_title))); break; case R.id.licenseButton: new LicensesDialog.Builder(AboutActivity.this) .setNotices(R.raw.notices_app) .build() .show(); break; case R.id.rateButton: try { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + APP_PNAME))); } catch (Exception e) { e.printStackTrace(); } break; case R.id.testersButton: ThemeUtils.roundAndShowDialog(AboutActivity.this, new MaterialDialog.Builder(AboutActivity.this) .title(R.string.testers) .content(R.string.testers_content) .positiveText(R.string.action_ok) .build()); break; case R.id.translatorsButton: ThemeUtils.roundAndShowDialog(AboutActivity.this, new MaterialDialog.Builder(AboutActivity.this) .title(R.string.translators) .content(getString(R.string.translators_content, StoreUtils.getStringFromRaw(getResources(), R.raw.translators))) .positiveText(R.string.action_ok) .build()); break; case R.id.contributorsButton: ThemeUtils.roundAndShowDialog(AboutActivity.this, new MaterialDialog.Builder(AboutActivity.this) .title(R.string.contributors) .content(getString(R.string.contributors_content, getString(R.string.contributors_names))) .positiveText(R.string.action_ok) .build()); break; case R.id.sourceButton: Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/aricneto/TwistyTimer")); startActivity(browserIntent); break; case R.id.translateButton: Intent translateBrowserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://crwd.in/twisty-timer")); startActivity(translateBrowserIntent); break; } }
Example #25
Source File: SettingsFragment.java From Jager with GNU General Public License v3.0 | 4 votes |
private void createLicensesDialog () { new LicensesDialog.Builder (getActivity ()).setNotices (R.raw.licenses) .build () .show (); }
Example #26
Source File: SettingsFragment.java From fontster with Apache License 2.0 | 4 votes |
private boolean openLicensesDialog() { new LicensesDialog.Builder(getActivity()) .setNotices(Licenses.getNotices()) .build().show(); return true; }
Example #27
Source File: MainActivity.java From LicensesDialog with Apache License 2.0 | 4 votes |
public void onMultipleClick(final View view) { new LicensesDialog.Builder(this) .setNotices(R.raw.notices) .build() .show(); }
Example #28
Source File: SettingsAboutFragment.java From Rey-MusicPlayer with Apache License 2.0 | 4 votes |
@Override public void onCreate(Bundle onSavedInstanceState) { super.onCreate(onSavedInstanceState); addPreferencesFromResource(R.xml.settings_about); ((SettingActivity) getActivity()).setToolbarTitle(getString(R.string.licenses_and_about)); mPreferenceManager = getPreferenceManager(); mContactsUsPreference = mPreferenceManager.findPreference("preference_key_contact_us"); mAboutUsPreference=mPreferenceManager.findPreference("preference_key_about_us"); mAboutUsPreference.setOnPreferenceClickListener(preference -> { AlertDialog.Builder builder =new AlertDialog.Builder(getActivity()); View view =LayoutInflater.from(getActivity()).inflate(R.layout.layout_about,null); ((TextView)view.findViewById(R.id.version_name)).setText(Common.getVersionName()); builder.setView(view); builder.setTitle(R.string.about); builder.setPositiveButton(R.string.ok, (dialog, which) -> dialog.dismiss()); builder.create().show(); return false; }); mLicensesPreference = mPreferenceManager.findPreference("preference_key_licenses"); mContactsUsPreference.setOnPreferenceClickListener(preference -> { Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", "[email protected]", null)); emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Boom Music Player Support"); startActivity(Intent.createChooser(emailIntent, "Send email")); return false; }); mLicensesPreference.setOnPreferenceClickListener(preference -> { final Notices notices = new Notices(); notices.addNotice(new Notice("SeekArc", "https://github.com/neild001/SeekArc", "Neil Davies", new MITLicense())); notices.addNotice(new Notice("RangeSliderView", "https://github.com/channguyen/range-slider-view", "Chan Nguyen", new MITLicense())); notices.addNotice(new Notice("range-seek-bar", "https://github.com/anothem/android-range-seek-bar", "Neil Davies", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("jaudiotagger", "https://bitbucket.org/ijabz/jaudiotagger", "Paul Taylor", new GnuGeneralPublicLicense20())); notices.addNotice(new Notice("Universal Image Loader", "https://github.com/nostra13/Android-Universal-Image-Loader", "Sergey Tarasevich", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("android-betterpickers", "https://github.com/code-troopers/android-betterpickers", "Derek Brameyer", new ApacheSoftwareLicense20())); notices.addNotice(new Notice("VerticalSeekBar", "https://github.com/h6ah4i/android-verticalseekbar", "Derek Brameyer", new ApacheSoftwareLicense20())); new LicensesDialog.Builder(getActivity()) .setNotices(notices) .setIncludeOwnLicense(true) .build() .show(); return false; }); }