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


Java CodeProcessor类代码示例

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


CodeProcessor类属于io.github.kbiakov.codeview.classifier包,在下文中一共展示了CodeProcessor类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import io.github.kbiakov.codeview.classifier.CodeProcessor; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    // train classifier on app start
    CodeProcessor.init(this);
    AjLatexMath.init(this); // init library: load fonts, create paint, etc.

    List<Attachment> attachments = new ArrayList<>();
    attachments.add(new ExampleAttachment("Android Image", "53ce1", true, "http://tse1.mm.bing.net/th?id=OIP.M24baa78c1fb80a71891ce775d11e038ao0&w=166&h=166&c=7&qlt=90&o=4&pid=1.7"));
    attachments.add(new ExampleAttachment("Here is a link", "bc41a", false, "https://google.com"));

    FlexibleRichTextView flexibleRichTextView = (FlexibleRichTextView) findViewById(R.id.frtv);
    Tokenizer.setCenterStartLabels("<center>");
    Tokenizer.setCenterEndLabels("</center>");
    Tokenizer.setTitleStartLabels("<h>");
    Tokenizer.setTitleEndLabels("</h>");

    flexibleRichTextView.setText("<h><center>hi!</center></h>" +
                    "[quote]This is quote\n" +
                    "second line\n" +
                    "third line\n" +
                    "fourth line[/quote]" +
                    "Here is an attachment:[attachment:53ce1]" +
                    "[code]print(\"Hello FlexibleRichTextView!\")[/code]" +
                    "Hello FlexibleRichTextView!\n" +
                    "This is LaTeX:\n" +
                    "$e^{\\pi i} + 1 = 0$\n" +
                    "This is table:\n" +
                    "| First Header  | Second Header |\n" +
                    "| --- | --- |\n" +
                    "| Content Cell  | Content Cell  |\n" +
                    "| Content Cell  | Content Cell  |\n" +
                    "An attachment is shown at the bottom: \n",
            attachments);
}
 
开发者ID:daquexian,项目名称:FlexibleRichTextView,代码行数:38,代码来源:MainActivity.java

示例2: onCreate

import io.github.kbiakov.codeview.classifier.CodeProcessor; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    // train classifier on app start
    CodeProcessor.init(this);
    ChaoliApplication.appContext = getApplicationContext();
    if (NightModeHelper.isDay()){
        AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
    }else {
        AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
    }
    Stetho.initializeWithDefaults(this);
}
 
开发者ID:daquexian,项目名称:chaoli-forum-for-android-2,代码行数:14,代码来源:ChaoliApplication.java

示例3: onCreate

import io.github.kbiakov.codeview.classifier.CodeProcessor; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    CodeProcessor.init(this);
}
 
开发者ID:OlgaKuklina,项目名称:GitJourney,代码行数:6,代码来源:GJApplication.java


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