当前位置: 首页>>代码示例>>Java>>正文


Java LicensesDialogFragment.show方法代码示例

本文整理汇总了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;
}
 
开发者ID:hotchemi,项目名称:redpen-android,代码行数:17,代码来源:SettingsFragment.java

示例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);
}
 
开发者ID:PSDev,项目名称:LicensesDialog,代码行数:18,代码来源:SampleActivity.java

示例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);
}
 
开发者ID:PSDev,项目名称:LicensesDialog,代码行数:19,代码来源:AppCompatSampleActivity.java

示例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);
}
 
开发者ID:guiguito,项目名称:AIRShare,代码行数:30,代码来源:MotherActivity.java

示例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);
}
 
开发者ID:jayjaykim,项目名称:JayJayLab-Android-Demo,代码行数:13,代码来源:ActivityMain.java

示例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);
}
 
开发者ID:PSDev,项目名称:LicensesDialog,代码行数:15,代码来源:SampleActivity.java

示例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);
}
 
开发者ID:PSDev,项目名称:LicensesDialog,代码行数:8,代码来源:SampleActivity.java

示例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);
}
 
开发者ID:PSDev,项目名称:LicensesDialog,代码行数:10,代码来源:SampleActivity.java

示例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);
}
 
开发者ID:PSDev,项目名称:LicensesDialog,代码行数:14,代码来源:SampleActivity.java

示例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);
}
 
开发者ID:PSDev,项目名称:LicensesDialog,代码行数:12,代码来源:SampleActivity.java

示例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);
}
 
开发者ID:PSDev,项目名称:LicensesDialog,代码行数:16,代码来源:AppCompatSampleActivity.java

示例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);
}
 
开发者ID:PSDev,项目名称:LicensesDialog,代码行数:9,代码来源:AppCompatSampleActivity.java

示例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);
}
 
开发者ID:PSDev,项目名称:LicensesDialog,代码行数:11,代码来源:AppCompatSampleActivity.java

示例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);
}
 
开发者ID:PSDev,项目名称:LicensesDialog,代码行数:15,代码来源:AppCompatSampleActivity.java

示例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);
}
 
开发者ID:PSDev,项目名称:LicensesDialog,代码行数:13,代码来源:AppCompatSampleActivity.java


注:本文中的de.psdev.licensesdialog.LicensesDialogFragment.show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。