Skip to content

Commit 22c1af6

Browse files
Add English docs
1 parent fa93c53 commit 22c1af6

File tree

14 files changed

+1052
-7
lines changed

14 files changed

+1052
-7
lines changed

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ allprojects {
3737
```groovy
3838
android {
3939
buildFeatures {
40-
viewBinding = true
40+
viewBinding true
4141
}
4242
}
4343

docs/_navbar.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* [En](/en/)
2+
* [中文](/)

docs/_sidebar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
* [介绍](/)
22

33
* Kotlin 用法
4-
* [使用属性委托](/kotlin/propertydelegate)
4+
* [使用扩展函数](/kotlin/ext)
55
* [封装到基类](/kotlin/baseclass)
66
* [兼容 BRVAH](/kotlin/brvah)
77

docs/en/README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# ViewBindingKTX
2+
3+
[![](https://www.jitpack.io/v/DylanCaiCoding/ViewBindingKTX.svg)](https://www.jitpack.io/#DylanCaiCoding/ViewBindingKTX)
4+
[![](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](https://github.com/DylanCaiCoding/ViewBindingKtx/blob/master/LICENSE)
5+
[![GitHub Repo stars](https://img.shields.io/github/stars/DylanCaiCoding/ViewBindingKTX?style=social)](https://github.com/DylanCaiCoding/ViewBindingKTX)
6+
7+
[ViewBinding](https://developer.android.com/topic/libraries/view-binding) reduces exceptions caused by id or type errors, which are recommended by both Google officials and Jake Wharton, but it can be a bit cumbersome to use, so this library can **help you use ViewBinding with as little code as possible in any usage scenario**.
8+
9+
## Feature
10+
11+
- Support for the usage of Kotlin and Java
12+
- Support for the usage of reflection and non-reflection
13+
- Support to modify your base class to support ViewBinding
14+
- Support for BaseRecyclerViewAdapterHelper
15+
- Support for Activity, Fragment, Dialog, Adapter
16+
- Support automatic release of binding class instance in Fragment
17+
- Support for custom combination view
18+
- Support for TabLayout to set custom view
19+
- Support for NavigationView to set header view
20+
- Support for DataBinding to automatically set the lifecycle owner
21+
22+
## Gradle
23+
24+
Add it in your root build.gradle at the end of repositories:
25+
```groovy
26+
allprojects {
27+
repositories {
28+
// ...
29+
maven { url 'https://www.jitpack.io' }
30+
}
31+
}
32+
```
33+
34+
Add dependencies and configurations:
35+
36+
```groovy
37+
android {
38+
buildFeatures {
39+
viewBinding true
40+
}
41+
}
42+
43+
dependencies {
44+
// The following are optional, please add as needed
45+
implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-ktx:1.2.6'
46+
implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-nonreflection-ktx:1.2.6'
47+
implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-base:1.2.6'
48+
implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-brvah:1.2.6'
49+
}
50+
```
51+
52+
## Change log
53+
54+
[Releases](https://github.com/DylanCaiCoding/ViewBindingKTX/releases)
55+
56+
## Author's other libraries
57+
58+
| Library | Description |
59+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
60+
| [Longan](https://github.com/DylanCaiCoding/Longan) | A collection of Kotlin utils which makes Android application development faster and easier. |
61+
| [LoadingStateView](https://github.com/DylanCaiCoding/LoadingStateView) | Decoupling the code of toolbar or loading status view. |
62+
| [MMKV-KTX](https://github.com/DylanCaiCoding/MMKV-KTX) | Use MMKV with property delegates. |
63+
| [ActivityResultLauncher](https://github.com/DylanCaiCoding/ActivityResultLauncher) | Replace startActivityForResult() method gracefully. |
64+
65+
## License
66+
67+
```
68+
Copyright (C) 2020. Dylan Cai
69+
70+
Licensed under the Apache License, Version 2.0 (the "License");
71+
you may not use this file except in compliance with the License.
72+
You may obtain a copy of the License at
73+
74+
http://www.apache.org/licenses/LICENSE-2.0
75+
76+
Unless required by applicable law or agreed to in writing, software
77+
distributed under the License is distributed on an "AS IS" BASIS,
78+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
79+
See the License for the specific language governing permissions and
80+
limitations under the License.
81+
```

docs/en/_sidebar.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
* [Introduce](/en/)
2+
3+
* Kotlin Usage
4+
* [Use extension functions](/en/kotlin/ext)
5+
* [Use in base class](/en/kotlin/baseclass)
6+
* [Use in BRVAH](/en/kotlin/brvah)
7+
8+
* Java usage
9+
* [Use in base class](/en/java/baseclass)
10+
* [Use in BRVAH](/en/java/brvah)
11+
12+
* Others
13+
* [Q&A](/en/others/q&a)

0 commit comments

Comments
 (0)