package jackall.moncalc.fragment import android.arch.lifecycle.ViewModelProviders import android.databinding.DataBindingUtil import android.os.Bundle import android.support.v4.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import jackall.moncalc.R import jackall.moncalc.databinding.FragmentAnalyzeFruitBinding import jackall.moncalc.viewmodel.FruitAnalyzeViewModel /** * Created by matsumoto_k on 2017/11/04. */ class FruitAnalyze : Fragment() { lateinit var binding: FragmentAnalyzeFruitBinding val fruitAnalyzeViewModel by lazy { ViewModelProviders.of(this, FruitAnalyzeViewModel.Factory()).get(FruitAnalyzeViewModel::class.java) } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) } override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { binding = DataBindingUtil.inflate<FragmentAnalyzeFruitBinding>(inflater, R.layout.fragment_analyze_fruit, container, false) binding.fruitAnalyzeViewModel = fruitAnalyzeViewModel return binding.root return null } }