AndroidGUIIsComplicated
Newbie
Code:
autoCompleteTextViewFreqFunction.setText(function);
autoCompleteTextViewFreqFunction.performCompletion();
The problem is, I have some code that needs to be run after an item is selected and I am unsure how to go about it.
I can call code when an item is clicked, but not with performCompletion(). Id there a way to listen to that?
Code:
autoCompleteTextViewFreqFunction.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
if(arrayAdapterFreq.getItem(i).toString().contentEquals(getResources().getString(R.string.Constant)))
// setUp GUI
}
}
});
textInputLayoutFreqFunction.requestFocus();
}
I could call onItemClick() explicitly, but how do I get the id of the text that was set?