Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
liangjingkanji committed Mar 13, 2022
1 parent f24f69e commit 875ae52
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 55 deletions.
10 changes: 5 additions & 5 deletions docs/api/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ html ::-webkit-scrollbar-thumb {
color: var(--average-color);
outline: none;
margin: 0 8px;
font-family: "JetBrains Mono", "HYZhengYuan";
font-family: "JetBrains Mono";
}

.breadcrumbs {
font-family: "JetBrains Mono", "HYZhengYuan";
font-family: "JetBrains Mono";
}

.section-tab:hover {
Expand Down Expand Up @@ -383,7 +383,7 @@ code.paragraph {
position: relative;
user-select: none; /* there's a weird bug with text selection */
padding: 8px 0;
font-family: "JetBrains Mono", "HYZhengYuan";
font-family: "JetBrains Mono";
}

.sideMenuPart a {
Expand Down Expand Up @@ -450,7 +450,7 @@ code.paragraph {
}

body, table {
font-family: "JetBrains Mono", "HYZhengYuan", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-family: "JetBrains Mono", "Helvetica Neue", Helvetica, Arial, sans-serif;
background: #F4F4F4;
font-style: normal;
font-weight: normal;
Expand Down Expand Up @@ -1114,7 +1114,7 @@ td.content {

.footer > span {
padding: 0 16px;
font-family: "JetBrains Mono", "HYZhengYuan";
font-family: "JetBrains Mono";
}

.footer a {
Expand Down
12 changes: 12 additions & 0 deletions docs/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@

每个界面都应当继承自`Engine<组件类型>`的抽象类

| 基类 | 描述 |
|-|-|
| Engine.kt | 当前Activity, 当前Application |
| EngineActivity | Activity |
| EngineSwipeActivity | 可侧滑返回的Activity |
| EngineToolbarActivity | 拥有工具栏的Activity |
| EngineFragment | Fragment |
| EngineNavFragment | 适用于Navigation导航框架的Fragment基类 |
| EngineDialog | 对话框基类 |
| EngineDialogFragment | DialogFragment基类 |
| EngineBottomSheetDialogFragment | BottomSheetDialogFragment基类 |

## 基类

例如: EngineActivity 提供最基础的界面
Expand Down
14 changes: 13 additions & 1 deletion docs/css/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@
font-weight: bold;
font-style: normal;
}

* {
-webkit-font-feature-settings: "liga" on, "calt" on;
-webkit-font-smoothing: subpixel-antialiased;
-moz-osx-font-smoothing: auto;
text-rendering: optimizeLegibility;
font-family: "JetBrains Mono", "HYZhengYuan", monospace !important;
font-family: "JetBrains Mono", HYZhengYuan, monospace !important;
}

/*布局*/
Expand Down Expand Up @@ -117,7 +118,18 @@ table tr:nth-child(2n), thead {
border: 1px solid #dfe2e5;
}

/*隐藏搜索框, 因为不支持中文搜索*/
.md-search__form {
visibility: hidden;
}

/*引用*/
.md-typeset :is(.admonition,details) {
font-size: 12px;
}
[dir=ltr] .md-typeset blockquote {
border-left:none;
}
.md-typeset blockquote {
color: inherit;
padding: 10px 16px;
Expand Down
50 changes: 1 addition & 49 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,62 +6,14 @@

本项目存在很多独立依赖的第三方库, 为避免耦合发生并不会默认集成

### 基类

| 基类 | 描述 |
|-|-|
| Engine.kt | 当前Activity, 当前Application |
| EngineActivity | Activity |
| EngineSwipeActivity | 可侧滑返回的Activity |
| EngineToolbarActivity | 拥有工具栏的Activity |
| EngineFragment | Fragment |
| EngineNavFragment | 适用于Navigation导航框架的Fragment基类 |
| EngineDialog | 对话框基类 |
| EngineDialogFragment | DialogFragment基类 |
| EngineBottomSheetDialogFragment | BottomSheetDialogFragment基类 |

### 工具

| 工具 | |
| ------------------------ | ------------------------------------ |
| SpanBuilder.kt | 快速实现SpannableString, 支持正则/匹配替换 |
| KeyBoard.kt | 键盘相关, 键盘遮挡/显示/隐藏/高度... |
| Preference.kt | SharePreference存储, 委托属性 |
| DigitsInputFilter.kt | 输入框小数点以及数字位数限制 |
| Intents.kt | 意图创建, 开启Activity/Service等组件 |
| JetPack.kt | JetPack框架相关 |
| ThrottleClickListener.kt | 点击事件防抖动 |
| UnitUtils.kt | 单位换算 |
| Dialog.kt | 对话框创建 |
| DataBindingComponent.kt | DataBinding常用需求 |
| DataBindUtils.kt | 创建DataBinding |
| ObservableIml | 如果不便继承BaseObservable可实现该接口等效于 |

### 视图

| 组件 | 描述 |
|-|-|
| FixedViewPager | 修复崩溃和可关闭划动的ViewPager |
| ViewPagerForMaxHeight | 使用最高页面height的ViewPager |
| GridPasswordView | 交易密码输入框 |
| ScrollPickerView | 上下划动选择器 |
| IndexSideBar | 字母索引列表 |
| MarqueeTextView | 文字跑马灯 |
| NestedRadioGroup | 支持任意嵌套的RadioButton单选 |
| SmoothCheckBox | 漂亮的平滑切换开关 |
| WaveView | 水纹波动 |
| FilterCheckBox | 过滤是否可选的CheckBox |
| FilterSeekBar | 过滤是否可滑动进度条SeekBar |
| VerificationCodeEditText | 验证码输入框 |
| FloatMenu | 浮动菜单 |

## 独立依赖
Engine库中使用的独立依赖存在于Demo中名为sample的Module的`build.gradle`

| 函数 | 描述 |
|-|-|
| [Net](https://github.com/liangjingkanji/Net) | 基于协程的并发网络请求库 |
| [BRV](https://github.com/liangjingkanji/BRV) | 基于DSL作用域快速创建列表 |
| [spannable](https://github.com/liangjingkanji/spannable) | Android最强Spannable工具, 首个支持替换/正则匹配Spannable的库 |
| [Serialize](https://github.com/liangjingkanji/Serialize) | 应用数据管理的神器, 比数据库更方便, 可创建自动读写本地/意外销毁恢复的字段. 支持组件传递数据 |
| [StatusBar](https://github.com/liangjingkanji/StatusBar) | 透明状态栏 |
| [StateLayout](https://github.com/liangjingkanji/StateLayout) | 缺省页 |
Expand Down
13 changes: 13 additions & 0 deletions docs/utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
| 工具 | |
| ------------------------ | ------------------------------------ |
| KeyBoard.kt | 键盘相关, 键盘遮挡/显示/隐藏/高度... |
| Preference.kt | SharePreference存储, 委托属性 |
| DigitsInputFilter.kt | 输入框小数点以及数字位数限制 |
| Intents.kt | 意图创建, 开启Activity/Service等组件 |
| JetPack.kt | JetPack框架相关 |
| ThrottleClickListener.kt | 点击事件防抖动 |
| UnitUtils.kt | 单位换算 |
| Dialog.kt | 对话框创建 |
| DataBindingComponent.kt | DataBinding常用需求 |
| DataBindUtils.kt | 创建DataBinding |
| ObservableIml | 如果不便继承BaseObservable可实现该接口等效于 |
16 changes: 16 additions & 0 deletions docs/view.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
| 组件 | 描述 |
|-|-|
| FixedViewPager | 修复崩溃和可关闭划动的ViewPager |
| MaxHeightScrollView | 支持`scroll_maxHeight`最大高度设置的ScrollView |
| ViewPagerForMaxHeight | 使用最高页面height的ViewPager |
| GridPasswordView | 交易密码输入框 |
| ScrollPickerView | 上下划动选择器 |
| IndexSideBar | 字母索引列表 |
| MarqueeTextView | 文字跑马灯 |
| NestedRadioGroup | 支持任意嵌套的RadioButton单选 |
| SmoothCheckBox | 漂亮的平滑切换开关 |
| WaveView | 水纹波动 |
| FilterCheckBox | 过滤是否可选的CheckBox |
| FilterSeekBar | 过滤是否可滑动进度条SeekBar |
| VerificationCodeEditText | 验证码输入框 |
| FloatMenu | 浮动菜单 |
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ markdown_extensions:
nav:
- 引擎索引: index.md
- 基类: base.md
- 视图: view.md
- 工具: utils.md
- 函数文档: api/index.html

0 comments on commit 875ae52

Please sign in to comment.