LiveData Oservable

MainThread 네트워크

쓰레드간 통신

Thread{
}.run() **run쓰면 멈춤!!!!!!!!!!!!!!!!!!**
Thread{
}.start()

context switching 면접 중요

안드로이드 핸들러

AsyncTask

DataBinding 실시간

<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="<http://schemas.android.com/apk/res/android>"
    xmlns:app="<http://schemas.android.com/apk/res-auto>"
    xmlns:tools="<http://schemas.android.com/tools>">
    <data>
        <variable
            name="sample"
            type="com.example.simplegithubapp.SampleData" />
    </data>
<androidx.constraintlayout.widget.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".PracticeActivity">

    <TextView
        android:id="@+id/txt_count"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        **android:text="@{String.valueOf(sample.count)}"**
        app:layout_constraintBottom_toTopOf="@+id/btn_count"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <Button
        android:id="@+id/btn_count"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Button"
        android:onClick="@{()->sample.countUp()}"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/txt_count" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

android:text="@{String.valueOf(sample.count)}"