package com.robotsandpencils.testapp.tab2


import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.navigation.fragment.findNavController
import com.robotsandpencils.testapp.R
import kotlinx.android.synthetic.main.fragment_tab2.*

/**
 * A simple [Fragment] subclass.
 *
 */
class Tab2Fragment : Fragment() {

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
                              savedInstanceState: Bundle?): View? {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_tab2, container, false)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)

        testNav.setOnClickListener {
            findNavController().navigate(Tab2FragmentDirections.actionTab2ToGlobal())
        }
    }
}
