package com.youra.qlicker.Acitvitys.EER.DefinitionTypo;
import com.hbb20.CountryCodePicker;
import com.youra.qlicker.R;
import androidx.appcompat.app.AppCompatActivity;

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

public class Typo4Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_typo4);

        ImageView btn_back = (ImageView) findViewById(R.id.img_back);
        TextView btn_next = (TextView) findViewById(R.id.btn_next);
        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()  );

            }
        });

        /// click btn for return previous activity
        btn_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(Typo4Activity.this, TypoMREActivity.class ));

            }
        });


    }

    private void setStartActivity(){
        startActivity(new Intent(Typo4Activity.this , TypoMREActivity.class ));
    }
}