简书Markdown用法
2018-01-30 本文已影响13人
好记性不如烂Bettle
插入链接
插入图片
[图片上传失败...(image-4d4f11-1517297643597)]
引用
/**
* Set the top and bottom offset for this {@link ViewOffsetHelper}'s view.
*
* @param offset the offset in px.
* @return true if the offset has changed
*/
public boolean setTopAndBottomOffset(int offset) {
if (mOffsetTop != offset) {
mOffsetTop = offset;
updateOffsets();
return true;
}
return false;
}
粗体
哈哈哈哈
斜体
呵呵呵呵
代码的引用
单行代码的引用
public boolean setTopAndBottomOffset(int offset) {
多行代码的引用
private void updateOffsets() {
ViewCompat.offsetTopAndBottom(mView, mOffsetTop - (mView.getTop() - mLayoutTop));
ViewCompat.offsetLeftAndRight(mView, mOffsetLeft - (mView.getLeft() - mLayoutLeft));
}
表格
左对齐 | 居中 | 右对齐 |
---|---|---|
col 3 is | right-aligned | $1600 |
col 2 is | centered | $12 |
zebra stripes | are neat | $1 |
dog | bird | cat |
---|---|---|
foo | foo | foo |
bar | bar | bar |
baz | baz | baz |
MarkDown详细使用方法
注:以上文档的代码,可直接拷贝使用
###插入链接
[百度](https://www.baidu.com/)
###插入图片

###引用
> /**
* Set the top and bottom offset for this {@link ViewOffsetHelper}'s view.
*
* @param offset the offset in px.
* @return true if the offset has changed
*/
public boolean setTopAndBottomOffset(int offset) {
if (mOffsetTop != offset) {
mOffsetTop = offset;
updateOffsets();
return true;
}
return false;
}
###粗体
**哈哈哈哈**
###斜体
*呵呵呵呵*
###代码的引用
#####单行代码的引用
` public boolean setTopAndBottomOffset(int offset) { `
#####多行代码的引用(注:用的时候去掉括号)
(```
private void updateOffsets() {
ViewCompat.offsetTopAndBottom(mView, mOffsetTop - (mView.getTop() - mLayoutTop));
ViewCompat.offsetLeftAndRight(mView, mOffsetLeft - (mView.getLeft() - mLayoutLeft));
}
```)
###表格
| 左对齐| 居中| 右对齐|
| -------- |:------:| -------:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
dog | bird | cat
----|------|----
foo | foo | foo
bar | bar | bar
baz | baz | baz