• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java LicensesDialogFragment类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中de.psdev.licensesdialog.LicensesDialogFragment的典型用法代码示例。如果您正苦于以下问题:Java LicensesDialogFragment类的具体用法?Java LicensesDialogFragment怎么用?Java LicensesDialogFragment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LicensesDialogFragment类属于de.psdev.licensesdialog包,在下文中一共展示了LicensesDialogFragment类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: newFragment

import de.psdev.licensesdialog.LicensesDialogFragment; //导入依赖的package包/类
static LicensesDialogFragment newFragment(Context context) {
    return new LicensesDialogFragment.Builder(context)
            .setNotices(R.raw.licenses)
            .setShowFullLicenseText(false)
            .setUseAppCompat(true)
            .setIncludeOwnLicense(true)
            .setNoticesCssStyle(newCssStyle(context))
            .build();
}
 
开发者ID:ChaosLeong,项目名称:FxcnBeta,代码行数:10,代码来源:LicenseDialogFragmentProvider.java


示例5: 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


示例6: 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


示例7: 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


示例8: 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


示例9: 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


示例10: 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


示例11: 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


示例12: 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


示例13: 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


示例14: 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


示例15: 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


示例16: 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


示例17: onPreferenceClick

import de.psdev.licensesdialog.LicensesDialogFragment; //导入依赖的package包/类
@Override
public boolean onPreferenceClick(Preference preference) {
    LicensesDialogFragment
            .newInstance(R.raw.notices, false, true)
            .show(getActivity().getSupportFragmentManager(), "licenses");
    return true;
}
 
开发者ID:CiTuX,项目名称:TD,代码行数:8,代码来源:SettingsFragment.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SCMHead类代码示例发布时间:2022-05-23
下一篇:
Java AnalysisScope类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap