0

@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {

            //Define city spinner but we will populate the option through the selected state
            policeStationSelectDropdown = findViewById(R.id.psAutoCompleteText);

            // Obtain the selected district

             selectedDistrict = districtSelectDropdown.getSelectedItem().toString();


            Toast.makeText(Complaint_page.this,selectedDistrict, Toast.LENGTH_SHORT).show();

          //  int parentId = parent.getId();

            if (parent.getId() == R.id.districtAutoCompleteText)

getSelectedItem() is showing error?? How to use this with autoCompleteTextView. I want dependent dropdown using Exposed Drop-Down Menu and autoCompleteTextView using JAVA.

0 Answers0