kbiakov / CodeView-Android

Display code with syntax highlighting :sparkles: in native way.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

code show in one line

Dishant624 opened this issue · comments

CodeView codeView = (CodeView) findViewById(R.id.code_view);

    codeView.setVerticalFadingEdgeEnabled(true);
    codeView.highlightCode("java")
            .setColorTheme(ColorTheme.SOLARIZED_LIGHT)
            .setCodeContent(getString(R.string.code));

Does your code content contains line break characters?

You must add them, because text parser cannot understand where he should slice content on lines.