package com.youra.qlicker.Acitvitys.EER.DefinitionTypo;
import com.hbb20.CountryCodePicker;
import com.youra.qlicker.Acitvitys.EspacePerso.EPcheckPhoneActivity;
import com.youra.qlicker.Acitvitys.EspacePerso.EPgetPhoneActivity;
import com.youra.qlicker.R;

import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.AutoCompleteTextView;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

public class Typo2Activity extends AppCompatActivity {

    @RequiresApi(api = Build.VERSION_CODES.M)
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_typo2);

        TextView btn_next = (TextView) findViewById(R.id.btn_next);
        ImageView img_back = (ImageView) findViewById(R.id.img_back);
        AutoCompleteTextView dropcountry = (AutoCompleteTextView) findViewById(R.id.dropdown_country);
        CountryCodePicker country = (CountryCodePicker) findViewById(R.id.ccp);







        ///check  contry
        dropcountry.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                country.launchCountrySelectionDialog();




            }
        });
        country.setOnCountryChangeListener(new CountryCodePicker.OnCountryChangeListener() {
            @Override
            public void onCountrySelected() {
                dropcountry.setText( country.getSelectedCountryName()  );

            }
        });



        img_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();

            }
        });

        btn_next.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                startActivity(new Intent(Typo2Activity.this, Typo3Activity.class ));

            }
        });
    }
}