Handler.post() vs runOnUiThread() vs AsyncTask.execute() activity_main.xml MainActivity.kt package com.jwsoft.kotlinproject import android.os.AsyncTask import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.os.Handler import kotlinx.android.synthetic.main.activity_main.* class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?)..
Handler.post() vs runOnUiThread() vs AsyncTask.execute() activity_main.xml MainActivity.java package com.jwsoft.javaproject; import androidx.appcompat.app.AppCompatActivity; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.view.View; import android.widget.Button; import android.widget.TextView; public class MainActivity extends AppCompatActivity { ..
activity_main.xml MyAsyncTask.java package com.jwsoft.javaproject; import android.os.AsyncTask; import android.widget.TextView; public class MyAsyncTask extends AsyncTask { TextView tvText; public MyAsyncTask(TextView tvText) { this.tvText = tvText; } @Override protected void onPreExecute() { super.onPreExecute(); } @Override protected Boolean doInBackground(Void... voids) { for (int i=1; i
activity_main.xml MyAsyncTask.kt package com.jwsoft.kotlinproject import android.os.AsyncTask import android.widget.TextView import java.lang.Exception class MyAsyncTask(var tvText: TextView) : AsyncTask() { override fun onPreExecute() { super.onPreExecute() } override fun doInBackground(vararg params: Void?): Boolean { for (i in 1..50) { try { Thread.sleep(5) } catch (e: Exception) { e.printSta..
- Total
- Today
- Yesterday
- 안드로이드 #코틀린 #Android #Kotlin
- Kotlin
- ViewModel
- activity
- 혀가 길지 않은 개발자
- Architecture Pattern
- java
- handler
- ViewPager2
- ArrayList
- View
- JSONObject
- coroutine
- Intent
- Vue.js #Vue.js + javascript
- MVVM
- Design Pattern
- 코틀린
- CoordinatorLayout
- 안드로이드
- DataBinding
- James Kim
- fragment
- recyclerview
- JSONArray
- 자바
- Livedata
- TabLayout
- Android
- XML
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |