在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):tiagohm/MarkdownView开源软件地址(OpenSource Url):https://github.com/tiagohm/MarkdownView开源编程语言(OpenSource Language):Java 99.8%开源软件介绍(OpenSource Introduction):MarkdownViewAndroid library to display markdown text. It uses Flexmark and some of its extensions. SetupAdd it in your root build.gradle at the end of repositories: allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
} Add the dependency: implementation 'com.github.tiagohm.MarkdownView:library:LATEST-VERSION' Usage<br.tiagohm.markdownview.MarkdownView
android:id="@+id/markdown_view"
app:escapeHtml="false"
android:layout_width="match_parent"
android:layout_height="match_parent"/> mMarkdownView = (MarkdownView)findViewById(R.id.markdown_view);
mMarkdownView.addStyleSheet(new Github());
mMarkdownView.loadMarkdown("**MarkdownView**");
mMarkdownView.loadMarkdownFromAsset("markdown1.md");
mMarkdownView.loadMarkdownFromFile(new File());
mMarkdownView.loadMarkdownFromUrl("url"); Using EmojiesWithout internetAdd the dependency: implementation 'com.github.tiagohm.MarkdownView:emoji:LATEST-VERSION' Custom CSS//InternalStyleSheet css = new InternalStyleSheet();
InternalStyleSheet css = new Github();
css.addFontFace("MyFont", "condensed", "italic", "bold", "url('myfont.ttf')");
css.addMedia("screen and (min-width: 1281px)");
css.addRule("h1", "color: orange");
css.endMedia();
css.addRule("h1", "color: green", "font-family: MyFont");
mMarkdownView.addStyleSheet(css);
mMarkdownView.addStyleSheet(ExternalStyleSheet.fromAsset("github.css", null);
mMarkdownView.addStyleSheet(ExternalStyleSheet.fromAsset("github2.css", "screen and (min-width: 1281px)"); JavaScriptJavaScript js = new ExternalJavaScript(url, async, defer);
mMarkdownView.addJavascript(js); Embed a Single TweetFrom https://twitter.com/RealGrumpyCat/status/845101936550469634
Follow ButtonFrom https://twitter.com/tiag0hm
Themes
Support
LICENSE
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论