일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 달러예금
- kotlin
- Data Binding
- java
- ndk r24
- Mac
- 고금리
- KB
- CHAT GPT
- ndkVersion
- RETROFIT
- JetPack
- 예금
- Swift
- Android
- ios
- 3rd framework
- 새마을금고
- 청약
- Android Studio
- ChatGPT
- 사전청약
- MG더뱅킹정기예금
- arm-linux-androideabi
- gradle
- EditText
- 용산 호반써밋 에이디션
- audio record
- Andorid
- BindingAdapter
- Today
- Total
목록android (31)
pear
Request Body import com.google.gson.annotations.SerializedName; public class GptCall { @SerializedName("model") public String model; @SerializedName("messages") public messages messages; @SerializedName("max_tokens") public String max_tokens; public class messages { public String role; public String content; } } Request Body Json String Example //String json = "{\"model\": \"gpt-3.5-turbo\", \"m..
OKHttpclient import java.io.IOException; import java.util.concurrent.TimeUnit; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.logging.HttpLoggingInterceptor; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; import retrofit2.converter.scalars.ScalarsConverterFactory; public class RetrofitGPT ..
miss @JvmStatic miss match attribute miss match @BindingAdapter("text_num") miss match @InverseBindingAdapter(attribute = "text_num", event = "android:textAttrChanged") two-way-binding build message The expression 'viewmodelNum.getValue()' cannot be inverted, so it cannot be used in a two-way binding one-way-binding fatal message java.lang.RuntimeException: Unable to start activity ComponentInfo..
viewmodel private val _num = MutableLiveData(0) var num: LiveData = _num bindingadapter object CustomBindingAdapter{ @JvmStatic @BindingAdapter("text_int") fun setText(view: TextView, text: Int){ view.text = text.toString() } @JvmStatic @InverseBindingAdapter(attribute = "text_int", event = "android:textAttrChanged") fun getText(view: TextView): Int { return view.text.toString().toIntOrNull() ?:..
simple data binding https://developer.android.com/jetpack/androidx/releases/databinding gradle android { ... buildFeatures { dataBinding true } } Activity //connect activity & binding & viewmodel class NameActivity : AppCompatActivity() { private val viewModel: ViewModel by viewModels() //auto generate ActivityNameBinding private lateinit var binding : ActivityNameBinding override fun onCreate(s..
databinding send view & BindingAdapter ViewModel class ViewModel() : ViewModel() { //If want update view data then use LiveData //EditText support String simple private val _text = MutableLiveData(String) val data: LiveData = _text //EditText not support Int Type need BindingAdapter private val _num = MutableLiveData(String) val num: LiveData = _num layout BindingAdapter object EditTextDataBindi..
ViewModel class ViewModel() : ViewModel() { //EditText support String simple private val _text = MutableLiveData(String) val text: LiveData = _text //EditText not support Int need BindingAdapter private val _num = MutableLiveData(String) val num: LiveData = _num layout
비동기 처리에서 listener(callback event)의 관리를 simaple 하게 하기 위해 react, rx 등을 사용하고 있다 kotlin에서는 channel을 제공하고 있다. 기본적으로 send와 receive를 지원하며 blocking queue event라고 생각 하면 이해에 도움이 될거 같다. coroutine을 사용하여 비동기로 사용할 수 있다. trysend는 receive가 queue가 full이면 fail 처리 된다. send처럼 receive의 quque가 full이면 suspends되어 대기 한다. rx의 hot obserable과 유사한 개념을 가지고 있지만 기본적인 동작은 queue이다. trysend overflow option을 사용해서 유사하게 처리 할수 있을 것 같..