app/src/main/java/com/mohammadKZ/CoronaVirus_COVID19_statistics/fragments/HistoryFragment.java
private void ControllerViews() {

        spinnerCountry.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
                position = i;
            }

            @Override
            public void onNothingSelected(AdapterView<?> adapterView) {

            }
        });

        spinnerDay.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
                day = position + 1;
            }

            @Override
            public void onNothingSelected(AdapterView<?> parent) {

            }
        });

        confirm.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startWaiting();
                getHistory();
            }
        });

    }
// set the view controller ==> country spinner ,  day spinner , confirm btn
set the view controller ==> country spinner ,  day spinner , confirm btn
set the view controller == > country spinner day spinner confirm btn
private void ControllerViews() {
        spinnerCountry.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
                position = i;
            }
            @Override
            public void onNothingSelected(AdapterView<?> adapterView) {
            }
        });
        spinnerDay.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
                day = position + 1;
            }
            @Override
            public void onNothingSelected(AdapterView<?> parent) {
            }
        });
        confirm.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startWaiting();
                getHistory();
            }
        });
    }
private void ControllerViews ( ) { spinnerCountry . setOnItemSelectedListener ( new AdapterView . OnItemSelectedListener ( ) { @ Override public void onItemSelected ( AdapterView < ? > adapterView , View view , int i , long l ) { position = i ; } @ Override public void onNothingSelected ( AdapterView < ? > adapterView ) { } } ) ; spinnerDay . setOnItemSelectedListener ( new AdapterView . OnItemSelectedListener ( ) { @ Override public void onItemSelected ( AdapterView < ? > parent , View view , int position , long id ) { day = position + 1 ; } @ Override public void onNothingSelected ( AdapterView < ? > parent ) { } } ) ; confirm . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { startWaiting ( ) ; getHistory ( ) ; } } ) ; }
set the view controller ==> country spinner ,  day spinner , confirm btn
set the view controller == > country spinner day spinner confirm btn