11# ViewBindingKTX
22
3- English | [ 中文] ( https://github.com/DylanCaiCoding/ViewBindingKtx/blob/master/README_CN .md)
3+ English | [ 中文] ( README_ZH .md)
44
55[ ![ ] ( https://www.jitpack.io/v/DylanCaiCoding/ViewBindingKTX.svg )] ( https://www.jitpack.io/#DylanCaiCoding/ViewBindingKTX ) [ ![ ] ( https://img.shields.io/badge/License-Apache--2.0-blue.svg )] ( https://github.com/DylanCaiCoding/ViewBindingKtx/blob/master/LICENSE )
66
@@ -43,16 +43,16 @@ android {
4343
4444dependencies {
4545 // The following are optional, please add as needed
46- implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-ktx:2.0.5 '
47- implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-nonreflection-ktx:2.0.5 '
48- implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-base:2.0.5 '
49- implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-brvah:2.0.5 '
46+ implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-ktx:2.0.6 '
47+ implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-nonreflection-ktx:2.0.6 '
48+ implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-base:2.0.6 '
49+ implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-brvah:2.0.6 '
5050}
5151```
5252
5353## Usage
5454
55- :pencil : ** [ Usage documentation] ( https://dylancaicoding.github.io/ViewBindingKTX/#/en/ ) **
55+ :pencil : ** [ >> Usage documentation << ] ( https://dylancaicoding.github.io/ViewBindingKTX/#/en/ ) **
5656
5757## Sample
5858
@@ -62,7 +62,6 @@ Get the binding instance using the Kotlin property delegate:
6262class MainActivity : AppCompatActivity () {
6363
6464 private val binding: ActivityMainBinding by binding()
65- // private val binding by binding(ActivityMainBinding::inflate)
6665
6766 override fun onCreate (savedInstanceState : Bundle ? ) {
6867 super .onCreate(savedInstanceState)
@@ -75,11 +74,8 @@ class MainActivity : AppCompatActivity() {
7574class HomeFragment : Fragment (R .layout.fragment_home) {
7675
7776 private val binding: FragmentHomeBinding by binding()
78- // private val binding by binding(FragmentHomeBinding::bind)
79-
8077 private val childBinding: LayoutChildBinding by binding(Method .INFLATE )
81- // private val childBinding by binding { LayoutChildBinding.inflate(layoutInflater) }
82-
78+
8379 override fun onViewCreated (view : View , savedInstanceState : Bundle ? ) {
8480 super .onViewCreated(view, savedInstanceState)
8581 binding.container.addView(childBinding.root)
@@ -132,7 +128,7 @@ See the [usage documentation](https://dylancaicoding.github.io/ViewBindingKTX) f
132128
133129| Library | Description |
134130| ------------------------------------------------------------ | ------------------------------------------------------------ |
135- | [ Longan] ( https://github.com/DylanCaiCoding/Longan ) | A collection of Kotlin utils |
131+ | [ Longan] ( https://github.com/DylanCaiCoding/Longan ) | Probably the best Kotlin utils library for Android. |
136132| [ LoadingStateView] ( https://github.com/DylanCaiCoding/LoadingStateView ) | Decoupling the code of toolbar or loading status view. |
137133| [ MMKV-KTX] ( https://github.com/DylanCaiCoding/MMKV-KTX ) | Use MMKV with property delegates. |
138134| [ Tracker] ( https://github.com/DylanCaiCoding/Tracker ) | A lightweight tracking framework based on the tracking idea of Buzzvideo.|
0 commit comments