本文整理汇总了Java中us.feras.mdv.MarkdownView类的典型用法代码示例。如果您正苦于以下问题:Java MarkdownView类的具体用法?Java MarkdownView怎么用?Java MarkdownView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MarkdownView类属于us.feras.mdv包,在下文中一共展示了MarkdownView类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreateView
import us.feras.mdv.MarkdownView; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.intro_changelog, container, false);
final MarkdownView md = v.findViewById(R.id.markdownview);
String lang = Utils.getLanguage("en", "de", "tr");
switch (lang) {
case "en":
md.loadMarkdownFile("file:///android_asset/english.md","file:///android_asset/style.css");
break;
case "de":
md.loadMarkdownFile("file:///android_asset/german.md","file:///android_asset/style.css");
break;
case "tr":
md.loadMarkdownFile("file:///android_asset/turkish.md","file:///android_asset/style.css");
break;
}
md.setBackgroundColor(Color.TRANSPARENT);
return v;
}
示例2: CommentsViewHolder
import us.feras.mdv.MarkdownView; //导入依赖的package包/类
CommentsViewHolder(View itemView, int viewType) {
super(itemView);
this.viewType = viewType;
if (viewType == 1) {
stateOV = (OcticonView) itemView.findViewById(R.id.state_ov);
titleTV = (TextView) itemView.findViewById(R.id.title_tv);
headFIIV = (FrescoAndIconicsImageView) itemView.findViewById(R.id.head_fiiv);
userTV = (TextView) itemView.findViewById(R.id.user_tv);
dateTV = (TextView) itemView.findViewById(R.id.date_tv);
labelsFL = (FlowLayout) itemView.findViewById(R.id.labels_ll);
bodyMDVMaster = (MarkdownView) itemView.findViewById(R.id.body_mdv);
} else {
userOV = (OcticonView) itemView.findViewById(R.id.title_ov);
userOV.resizeIcon(ResourceManager.getDimensionPixelSize(R.dimen.image_size_default));
dateOV = (OcticonView) itemView.findViewById(R.id.subtitle_ov);
dateOV.noIcon();
userOV.getFrescoAndIconicsImageView().setIcon(Octicons.Icon.oct_mark_github);
bodyMDV = (MarkdownView) itemView.findViewById(R.id.body_mdv);
}
}
示例3: init
import us.feras.mdv.MarkdownView; //导入依赖的package包/类
private void init() {
recyclerView = (RecyclerView) findViewById(R.id.list);
flowLayoutManager = new FlowLayoutManager().singleItemPerLine();
flowLayoutManager.setAutoMeasureEnabled(true);
recyclerView.setLayoutManager(flowLayoutManager);
recyclerView.setAdapter(new DemoAdapter(1, DemoUtil.generate(2000, 3, 13, 1, false)));
recyclerView.addItemDecoration(new RecyclerView.ItemDecoration() {
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
super.getItemOffsets(outRect, view, parent, state);
outRect.set(5, 5, 5, 5);
}
});
markdownView = (MarkdownView)findViewById(R.id.instruction_mdown);
markdownView.loadMarkdownFile("file:///android_asset/instruction.md");
loadSettingsFromSharedPref();
}
示例4: onCreate
import us.feras.mdv.MarkdownView; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
MarkdownView webView = new MarkdownView(this);
setContentView(webView);
webView.loadMarkdown(getIntent().getStringExtra("text"), "file:///android_asset/classic_theme_markdown.css");
}
示例5: initView
import us.feras.mdv.MarkdownView; //导入依赖的package包/类
private void initView() {
mCountry = (TextView)findViewById(R.id.company_country_tv);
mTitleTV = (TextView)findViewById(R.id.title_speaker_textView);
mBioTV = (MarkdownView )findViewById(R.id.bio_speaker_textView);
collapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsing_tool_bar);
tagsRV = (RecyclerView)findViewById(R.id.tags_recycler_view);
socialRV = (RecyclerView)findViewById(R.id.social_recycler_view);
collapsingToolbarLayout.setTitle(mSpeaker.name);
collapsingToolbarLayout.setTitleEnabled(true);
collapsingToolbarLayout.setCollapsedTitleTextColor(getResources().getColor(android.R.color.white));
collapsingToolbarLayout.setExpandedTitleColor(getResources().getColor(android.R.color.white));
// collapsingToolbarLayout.setContentScrimColor(palette.getMutedColor(primary));
// collapsingToolbarLayout.setStatusBarScrimColor(palette.getDarkMutedColor(primaryDark));
SocialAdapter socialAdapter = new SocialAdapter( mSpeaker.socials,this);
LinearLayoutManager layoutManager
= new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
socialRV.setLayoutManager(layoutManager);
socialRV.setAdapter(socialAdapter);
TagAdapter tagAdapter = new TagAdapter( mSpeaker.tags ,this);
LinearLayoutManager layoutTagManager
= new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
tagsRV.setLayoutManager(layoutTagManager);
tagsRV.setAdapter(tagAdapter);
mCountry.setText(mSpeaker.company+", "+ mSpeaker.country);
mTitleTV.setText(mSpeaker.title);
mBioTV.loadMarkdown(mSpeaker.bio);
Log.e("Tag", mSpeaker.toString());
}
示例6: onCreateView
import us.feras.mdv.MarkdownView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_preview_notice, container, false);
mdView = (MarkdownView) view.findViewById(R.id.markdownView);
mdView.loadMarkdown(notice.getContent());
notice.addNoticeListener(this);
return view;
}
示例7: initView
import us.feras.mdv.MarkdownView; //导入依赖的package包/类
@Override
public void initView() {
pathOV = (OcticonView) getRootView().findViewById(R.id.path_ll).findViewById(R.id.title_ov);
commitOV = (OcticonView) getRootView().findViewById(R.id.path_ll).findViewById(R.id.subtitle_ov);
pathOV.getFrescoAndIconicsImageView().setIcon(Octicons.Icon.oct_file_text);
commitOV.getFrescoAndIconicsImageView().setIcon(Octicons.Icon.oct_git_commit);
contentsMDV = (MarkdownView) getRootView().findViewById(R.id.contents_mdv);
}
示例8: initReadmeCardView
import us.feras.mdv.MarkdownView; //导入依赖的package包/类
private void initReadmeCardView() {
readmeCVG = (CardViewGroup) getRootView().findViewById(R.id.readme_cvg);
initCardView(readmeCVG, Octicons.Icon.oct_book, "README.md", null, null, "View all of README.md");
LinearLayout ll = (LinearLayout) readmeCVG.getContentView();
readmeMDV = new MarkdownView(getPresenter().getAndroidContext());
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
Utils.convertDpToPx(getPresenter().getAndroidContext(), 300));
ll.addView(readmeMDV, params);
}
示例9: onViewCreated
import us.feras.mdv.MarkdownView; //导入依赖的package包/类
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
markdownView = (MarkdownView) view.findViewById(R.id.markdown);
}
示例10: initView
import us.feras.mdv.MarkdownView; //导入依赖的package包/类
private void initView() {
mTitleTV = (TextView)findViewById(R.id.title_news_textView);
mContentTV = (MarkdownView)findViewById(R.id.news_detel_textView);
mTitleTV.setText(mNews.getTitle());
mTitleTV.setBackgroundColor(Color.parseColor(mNews.getPrimaryColor()));
mContentTV.loadMarkdown(mNews.fullText);
}