My android app has an AutoCompleteTextView in the activity_main.xml file with an ID "nameACTV". In the MainActivity.java file, when I try to write AutoCompleteTextView auto=findViewById(R.id.nameACTV) it shows red. When I try to set an adapter to the AutoCompleteTextView, as adapter=new AdapterView() auto.setAdapter(adapter); it says null; What's wrong?
I were trying to show some results as listview in the AutoCompleteTextView when the user types something. The listview will use a single line spinner layout and collect data from a StringArray inside the strings.xml file.