本文整理汇总了Java中de.psdev.licensesdialog.LicensesDialogFragment.show方法的典型用法代码示例。如果您正苦于以下问题:Java LicensesDialogFragment.show方法的具体用法?Java LicensesDialogFragment.show怎么用?Java LicensesDialogFragment.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.psdev.licensesdialog.LicensesDialogFragment
的用法示例。
在下文中一共展示了LicensesDialogFragment.show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onPreferenceClick
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
@Override
public boolean onPreferenceClick(Preference preference) {
switch (preference.getTitleRes()) {
case R.string.label_setting_about:
startActivity(createIntentWithUrl(getString(R.string.redpen_url)));
break;
case R.string.label_setting_feedback:
startActivity(createIntentWithUrl(getString(R.string.github_issue_url)));
break;
case R.string.label_setting_licence:
LicensesDialogFragment fragment = LicensesDialogFragment.newInstance(R.raw.notices, false, true);
fragment.show(getSupportFragmentManager(), null);
break;
}
return false;
}
示例2: onCustomCssStyleFragmentClick
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
public void onCustomCssStyleFragmentClick(final View view) throws Exception {
String formatString = getString(R.string.coustom_notices_format_style);
String pBg = getRGBAString(Color.parseColor("#9E9E9E"));
String bodyBg = getRGBAString(Color.parseColor("#424242"));
String preBg = getRGBAString(Color.parseColor("#BDBDBD"));
String liColor = "color: #ffffff";
String linkColor = "color: #1976D2";
String style = String.format(formatString, pBg, bodyBg, preBg, liColor, linkColor);
final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
.setNotices(R.raw.notices)
.setNoticesCssStyle(style)
.build();
fragment.show(getSupportFragmentManager(), null);
}
示例3: onCustomCssStyleFragmentClick
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
public void onCustomCssStyleFragmentClick(final View view) throws Exception {
String formatString = getString(R.string.coustom_notices_format_style);
String pBg = getRGBAString(Color.parseColor("#9E9E9E"));
String bodyBg = getRGBAString(Color.parseColor("#424242"));
String preBg = getRGBAString(Color.parseColor("#BDBDBD"));
String liColor = "color: #ffffff";
String linkColor = "color: #1976D2";
String style = String.format(formatString, pBg, bodyBg, preBg, liColor, linkColor);
final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
.setNotices(R.raw.notices)
.setNoticesCssStyle(style)
.setUseAppCompat(true)
.build();
fragment.show(getSupportFragmentManager(), null);
}
示例4: onOptionsItemSelected
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_rate:
try {
startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse("market://details?id=" + APP_PACKAGE)));
} catch (android.content.ActivityNotFoundException anfe) {
startActivity(new Intent(
Intent.ACTION_VIEW,
Uri.parse("http://play.google.com/store/apps/details?id="
+ APP_PACKAGE)));
}
break;
case R.id.action_help:
Intent intent = new Intent(this, LauncherActivity.class);
intent.putExtra(LauncherActivity.KEY_NO_BUTTON, true);
startActivity(intent);
break;
case R.id.action_about:
final LicensesDialogFragment fragment = LicensesDialogFragment
.newInstance(R.raw.notices, false);
fragment.show(getSupportFragmentManager(), null);
break;
default:
break;
}
return super.onOptionsItemSelected(item);
}
示例5: onOptionsItemSelected
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case R.id.menu_license:
final LicensesDialogFragment fragment = LicensesDialogFragment.newInstance(
R.raw.notices, false, true, R.style.LicenseDialogTheme, R.color.license_dialog_divider_color, this);
fragment.show(getSupportFragmentManager(), null);
return true;
}
return super.onOptionsItemSelected(item);
}
示例6: onSingleFragmentClick
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
public void onSingleFragmentClick(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);
final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
.setNotice(notice)
.setIncludeOwnLicense(false)
.build();
fragment.show(getSupportFragmentManager(), null);
}
示例7: onMultipleFragmentClick
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
public void onMultipleFragmentClick(final View view) throws Exception {
final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
.setNotices(R.raw.notices)
.build();
fragment.show(getSupportFragmentManager(), null);
}
示例8: onMultipleIncludeOwnFragmentClick
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
public void onMultipleIncludeOwnFragmentClick(final View view) throws Exception {
final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
.setNotices(R.raw.notices)
.setShowFullLicenseText(false)
.setIncludeOwnLicense(true)
.build();
fragment.show(getSupportFragmentManager(), null);
}
示例9: onMultipleProgrammaticFragmentClick
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
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);
}
示例10: onCustomThemeFragmentClick
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
public void onCustomThemeFragmentClick(final View view) throws Exception {
final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
.setNotices(R.raw.notices)
.setShowFullLicenseText(false)
.setIncludeOwnLicense(true)
.setThemeResourceId(R.style.custom_theme)
.setDividerColorRes(R.color.custom_divider_color)
.build();
fragment.show(getSupportFragmentManager(), null);
}
示例11: onSingleFragmentClick
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
public void onSingleFragmentClick(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);
final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
.setNotice(notice)
.setIncludeOwnLicense(false)
.setUseAppCompat(true)
.build();
fragment.show(getSupportFragmentManager(), null);
}
示例12: onMultipleFragmentClick
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
public void onMultipleFragmentClick(final View view) throws Exception {
final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
.setNotices(R.raw.notices)
.setUseAppCompat(true)
.build();
fragment.show(getSupportFragmentManager(), null);
}
示例13: onMultipleIncludeOwnFragmentClick
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
public void onMultipleIncludeOwnFragmentClick(final View view) throws Exception {
final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
.setNotices(R.raw.notices)
.setShowFullLicenseText(false)
.setIncludeOwnLicense(true)
.setUseAppCompat(true)
.build();
fragment.show(getSupportFragmentManager(), null);
}
示例14: onMultipleProgrammaticFragmentClick
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
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)
.setUseAppCompat(true)
.build();
fragment.show(getSupportFragmentManager(), null);
}
示例15: onCustomThemeFragmentClick
import de.psdev.licensesdialog.LicensesDialogFragment; //导入方法依赖的package包/类
public void onCustomThemeFragmentClick(final View view) throws Exception {
final LicensesDialogFragment fragment = new LicensesDialogFragment.Builder(this)
.setNotices(R.raw.notices)
.setShowFullLicenseText(false)
.setIncludeOwnLicense(true)
.setThemeResourceId(R.style.custom_theme)
.setDividerColorRes(R.color.custom_divider_color)
.setUseAppCompat(true)
.build();
fragment.show(getSupportFragmentManager(), null);
}