Databinding에서 setOnclick listener set 하기(Make onClick event in Android databinding)
안드로이드 데이터 바인딩에서 onclick event를 설정하는 방법중 2가지를 소개한다. How to make onClick event in Android databinding Call function Set declared onClickListener Call function android:onClick="@{()->viewModel.doSomething()}" 1 2 3 4 Set OnclickListener android:onClick="@{viewModel.onClickToastListener}" 1 val onClickToastListener = View.OnClickListener { showToast() } 1 2 3 4
𝐃𝐀𝐈𝐋𝐘 𝐓𝐈𝐏𝐒/ANDROID
2020. 6. 9. 17:18
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- annotaion
- GitHub
- module-info is missing a super type
- custom getter
- custom setter
- com.android.build.api.transform.TransformException
- Effective Kotlin
- android
- android databinding
- android aar
- Support for password authentication was removed on August 13
- viewmodel
- Make onClick event in Android databinding
- launchemode
- AndroidManifest
- DexArchiveBuilderException
- android aar library
- aar import
- databinding onclick not working
- databinding onClick
- import aar
- Cannot create an instance
- android launch mode in manifest
- AAR
- Kotlin
- Please use a personal access token instead
- How to import android AAR file
- decomplie
- Hilt
- The requested URL returned error
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함