package com.dafay.demo.viewbinding

import android.os.Bundle
import android.util.Log
import android.view.View
import androidx.fragment.app.Fragment
import by.kirich1409.viewbindingdelegate.viewBinding
import com.dafay.demo.viewbinding.databinding.FragmentTest01Binding

class Test01Fragment : Fragment(R.layout.fragment_test_01) {
    private val TAG = Test01Fragment::class.java.simpleName
    private val binding: FragmentTest01Binding by viewBinding()

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        Log.d(TAG, "onViewCreated()")
        binding.tvText.text = "00001"
    }

    override fun onDestroyView() {
        super.onDestroyView()
        Log.d(TAG, "onDestroyView()")
    }

    override fun onDestroy() {
        super.onDestroy()
        Log.d(TAG, "onDestroy()")
    }
}