ViewModel + DataBinding + LiveData + BindingAdapter build.gradle (Module: app) apply plugin: 'kotlin-kapt' android { dataBinding { enabled = true } } MainViewModel.kt package com.jwsoft.kotlinproject import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel class MainViewModel : ViewModel() { var liveColor: MutableLiveData = MutableLiveData() } BindingAdapters.kt package com...
DataBinding + LiveData + BindingAdapter build.gradle (Module: app) apply plugin: 'kotlin-kapt' android { dataBinding { enabled = true } } BindingAdapters.kt package com.jwsoft.kotlinproject import android.view.View import androidx.annotation.ColorInt import androidx.databinding.BindingAdapter object BindingAdapters { @JvmStatic @BindingAdapter("android:visibleJW") fun setVisible(view: View, bool..
build.gradle (Module: app) android { dataBinding { enabled = true } } activity_main.xml MainActivity.kt package com.jwsoft.kotlinproject import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import androidx.databinding.DataBindingUtil import androidx.lifecycle.MutableLiveData import com.jwsoft.kotlinproject.databinding.ActivityMainBinding class MainActivity : AppCompatActivity..
activity_main.xml MainActivity.kt package com.jwsoft.kotlinproject import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import androidx.lifecycle.MutableLiveData import androidx.lifecycle.Observer import kotlinx.android.synthetic.main.activity_main.* class MainActivity : AppCompatActivity() { private var liveName: MutableLiveData = MutableLiveData() override fun onCreate(save..
build.gradle (Module: app) android { dataBinding { enabled = true } } activity_main.xml MainActivity.kt package com.jwsoft.kotlinproject import android.graphics.Color import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import androidx.databinding.DataBindingUtil import com.jwsoft.kotlinproject.databinding.ActivityMainBinding class MainActivity : AppCompatActivity() { private..
- Total
- Today
- Yesterday
- MVVM
- 자바
- java
- fragment
- handler
- XML
- Design Pattern
- Android
- Kotlin
- recyclerview
- 혀가 길지 않은 개발자
- 안드로이드
- 코틀린
- James Kim
- ViewPager2
- View
- JSONArray
- TabLayout
- activity
- coroutine
- JSONObject
- 안드로이드 #코틀린 #Android #Kotlin
- ViewModel
- ArrayList
- DataBinding
- Intent
- Architecture Pattern
- CoordinatorLayout
- Livedata
- Vue.js #Vue.js + javascript
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |