package com.youra.qlicker.Fragments.RendezVous;

import android.os.Bundle;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;

import com.youra.qlicker.Classes.Globals;
import com.youra.qlicker.R;

public class RDV2Fragment extends Fragment {

    private Globals globals;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        //initialise class global
        globals = Globals.getInstance();


        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.fragment_rdv2, container, false);

        TextView btn_next = (TextView) view.findViewById(R.id.btn_next);
        TextView date_h = (TextView)view.findViewById(R.id.date_heur);

        date_h.setText( globals.getDate() +" à "+ globals.getTimeSelected());


        //go to next fragment
        btn_next.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Toast.makeText(getContext(), "next step", Toast.LENGTH_SHORT).show();
            }
        });

        return view;
    }
}