package com.robotsandpencils.testapp.tab1


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.NavGraphDirections
import com.robotsandpencils.testapp.R
import kotlinx.android.synthetic.main.fragment_tab1.*

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

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

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

        testNav.setOnClickListener {
            findNavController().navigate(NavGraphDirections.actionGlobalGlobalFragment())
        }
    }


}
