Markwon Copy Button for Fenced Code (MCBFC) is an Android reference implementation that shows how to extend the Markwon library with a fully custom layout for fenced code blocks — complete with a copy-to-clipboard button and horizontal scrolling for long lines. Everything runs inside aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tutosrive/mcbfc/llms.txt
Use this file to discover all available pages before exploring further.
RecyclerView, making it far faster than a single TextView for documents with many code blocks.
Introduction
Learn what MCBFC does and when to use it as a reference for your own project.
Quickstart
Set up dependencies, clone the repo, and run the demo app in minutes.
Core Concepts
Understand how Markwon, RecyclerView, and custom entries work together.
Reference
Full API reference for the
markdown class, BlockCodeEntry, and XML layouts.What You Get
High-performance markdown rendering
Markwon is rendered node-by-node into a
RecyclerView via MarkwonAdapter, so only visible items are bound — no frame drops on long documents.Custom fenced code block layout
Each fenced code block gets its own
ViewHolder backed by fenced_code_view.xml: a HorizontalScrollView keeps long lines readable and an ImageButton sits elevated in the top-right corner.One-tap clipboard copy
Tapping the copy icon writes the block’s text to the system
ClipboardManager and shows a Toast confirming the action — no third-party clipboard library required.MCBFC is a reference implementation, not a published library. Copy the source files into your project and adapt the layout and logic to match your design system.