本文整理匯總了Java中de.psdev.licensesdialog.LicensesDialog類的典型用法代碼示例。如果您正苦於以下問題:Java LicensesDialog類的具體用法?Java LicensesDialog怎麽用?Java LicensesDialog使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
LicensesDialog類屬於de.psdev.licensesdialog包,在下文中一共展示了LicensesDialog類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: prepareLicenses
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
/**
* 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();
}
});
}
});
}
示例2: onAboutLicensesClick
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
@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();
}
}
示例3: openSourceLicenses
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
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;
});
}
示例4: getTermsOfUseElement
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
private Element getTermsOfUseElement() {
Element element = new Element();
element.setTitle(getResources().getString(R.string.about_activity_terms_of_use));
element.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Notice notice = new Notice("Ikue",
"https://github.com/luke-c/Ikue",
"Copyright (C) 2017 Luke Casey",
new GnuGeneralPublicLicense30());
new LicensesDialog.Builder(AboutActivity.this)
.setTitle(getResources().getString(R.string.about_activity_terms_of_use))
.setNotices(notice)
.setShowFullLicenseText(true)
.build()
.show();
}
});
return element;
}
示例5: createLicenseDialog
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
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();
}
示例6: onClick
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.me:
startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse(getString(R.string.developer_url))));
break;
case R.id.rate:
HoooldUtils.rateApp(getApplication());
break;
case R.id.licenses:
new LicensesDialog.Builder(this)
.setNotices(R.raw.notices)
.setThemeResourceId(R.style.ToolBarLight_Popup)
.build()
.show();
break;
}
}
示例7: onClick
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.git:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/tanallnight/Blip")));
break;
case R.id.licenses:
new LicensesDialog.Builder(this)
.setNotices(R.raw.notices)
.build()
.show();
break;
case R.id.developer:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://plus.google.com/+TanmayParikh/posts")));
break;
}
}
示例8: clickOnOpenSourceLicenses
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
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();
}
示例9: setupLicenseDialog
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
/**
* Setup the dialog with all the OSS licenses utilized in the app
*/
private void setupLicenseDialog() {
final Notices notices = new Notices();
notices.addNotice(new Notice("Riasel", "https://github.com/thasmin/Riasel", "Dan Goldstein", new RiaselLicense()));
notices.addNotice(new Notice("Material Design Icons", "https://github.com/google/material-design-icons", "Google", new CCAttribution40IntlLicense()));
notices.addNotice(new Notice("Butterknife", "http://jakewharton.github.io/butterknife", "Jake Wharton", new ApacheSoftwareLicense20()));
notices.addNotice(new Notice("RxAndroid", "https://github.com/ReactiveX/RxAndroid", "Netflix", new ApacheSoftwareLicense20()));
notices.addNotice(new Notice("Google Gson", "https://code.google.com/p/google-gson", "Google", new ApacheSoftwareLicense20()));
notices.addNotice(new Notice("OkHttp", "http://square.github.io/okhttp", "Square", new ApacheSoftwareLicense20()));
notices.addNotice(new Notice("CWAC Wakeful", "http://commonsware.com/cwac", "commonsguy", new ApacheSoftwareLicense20()));
notices.addNotice(new Notice("Gradle Retrolambda Plugin", "https://github.com/evant/gradle-retrolambda", "Evan Tatarka", new ApacheSoftwareLicense20()));
notices.addNotice(new Notice("Android PagerSlidingTabStrip", "https://github.com/jpardogo/PagerSlidingTabStrip", "Andreas Stuetz", new ApacheSoftwareLicense20()));
notices.addNotice(new Notice("Sugar ORM", "http://satyan.github.com/sugar", "Satya Narayan", new MITLicense()));
notices.addNotice(new Notice("jsoup", "http://http://jsoup.org", "Jonathan Hedley", new MITLicense()));
LicensesDialog.Builder builder = new LicensesDialog.Builder(this);
builder.setNotices(notices);
builder.setIncludeOwnLicense(true);
mLicenseDialog = builder.build();
}
示例10: onClick
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.me:
startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse(getString(R.string.developer_url))));
break;
case R.id.source_code:
startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse(getString(R.string.source_code_url))));
break;
case R.id.rate:
PowerHourUtils.rateApp(getApplication());
break;
case R.id.licenses:
new LicensesDialog.Builder(this)
.setNotices(R.raw.notices)
.setThemeResourceId(R.style.ToolBarLight_Popup)
.build()
.show();
break;
}
}
示例11: onCreate
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
ft=getSupportFragmentManager().beginTransaction();
if(f_def==null)f_def=Default.newInstance(100);
ft.add(R.id.container,f_def);
ft.commit();
Notices ns=new Notices();
ns.addNotice(new Notice("MaterialTabHost","https://github.com/yanzm/MaterialTabHost","Copyright 2014 Yuki Anzai",new ApacheSoftwareLicense20()));
ns.addNotice(new Notice("LicensesDialog ","https://github.com/PSDev/LicensesDialog","Copyright 2013-2017 Philip Schiffer",new ApacheSoftwareLicense20()));
ns.addNotice(new Notice("MaterialEditText","https://github.com/rengwuxian/MaterialEditText","Copyright 2014 rengwuxian",new ApacheSoftwareLicense20()));
ld=new LicensesDialog.Builder(this)
.setTitle(R.string.notice)
.setCloseText(R.string.close)
.setNotices(ns)
.build();
}
示例12: showLicenseDialog
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
private void showLicenseDialog() {
LicenseResolver.registerLicense(MozillaPublicLicense20.instance);
new LicensesDialog.Builder(getActivity())
.setNotices(R.raw.licenses)
.setIncludeOwnLicense(true)
.build()
.showAppCompat();
}
示例13: showLicensesDialog
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
public void showLicensesDialog(View v) {
final Notices notices = new Notices();
notices.addNotice(new Notice("Retrofit", "https://github.com/square/retrofit", "Square, Inc", new ApacheSoftwareLicense20()));
notices.addNotice(new Notice("Material Dialogs", "https://github.com/afollestad/material-dialogs", "Aidan Michael Follestad", new MITLicense()));
notices.addNotice(new Notice("EasyPreferences", "https://github.com/Pixplicity/EasyPreferences", "Pixplicity", new ApacheSoftwareLicense20()));
new LicensesDialog.Builder(this)
.setTitle("Open source software licenses")
.setNotices(notices)
.setIncludeOwnLicense(false)
.build()
.show();
}
示例14: showLicenseDialog
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
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();
}
示例15: onCreate
import de.psdev.licensesdialog.LicensesDialog; //導入依賴的package包/類
@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_use");
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;
});
}