@Test public void onViewAttached() throws Exception { autoComplete.onViewAttached(editText); assertThat(autoComplete.getAdapter(), notNullValue()); assertThat(autoComplete.getEditText(), notNullValue()); }
@Override public void onViewAttached(@NonNull MultiAutoCompleteEditText view) { editText = view; adapter = new AutoCompleteAdapter(view.getContext(), typeAdapters, delayer); editText.setAdapter(adapter); editText.setTokenizer(tokenizer); editText.addTextChangedListener(this); editText.setOnSelectionChangedListener(this); adapter.registerDataSetObserver(dataSetObserver); for (TypeAdapterDelegate adapter : typeAdapters) { adapter.registerDataSetObserver(delegateDataSetObserver); } }
MultiAutoCompleteImpl implements MultiAutoComplete, TextWatcher, MultiAutoCompleteEditText.OnSelectionChangedListener { @Override public void onViewAttached(@NonNull MultiAutoCompleteEditText view) { editText = view; adapter = new AutoCompleteAdapter(view.getContext(), typeAdapters, delayer); editText.setAdapter(adapter); editText.setTokenizer(tokenizer); editText.addTextChangedListener(this); editText.setOnSelectionChangedListener(this); adapter.registerDataSetObserver(dataSetObserver); for (TypeAdapterDelegate adapter : typeAdapters) { adapter.registerDataSetObserver(delegateDataSetObserver); } } }
MultiAutoCompleteImpl implements MultiAutoComplete, TextWatcher, MultiAutoCompleteEditText.OnSelectionChangedListener { @Override public void onViewAttached(@NonNull MultiAutoCompleteEditText view) { editText = view; adapter = new AutoCompleteAdapter(view.getContext(), typeAdapters, delayer); editText.setAdapter(adapter); editText.setTokenizer(tokenizer); editText.addTextChangedListener(this); editText.setOnSelectionChangedListener(this); adapter.registerDataSetObserver(dataSetObserver); for (TypeAdapterDelegate adapter : typeAdapters) { adapter.registerDataSetObserver(delegateDataSetObserver); } } MultiAutoCompleteImpl(@NonNull Tokenizer tokenizer,
                          @NonNull List<TypeAdapterDelegate> typeAdapters,
                          @Nullable Delayer delayer); }
MultiAutoCompleteImpl implements MultiAutoComplete, TextWatcher, MultiAutoCompleteEditText.OnSelectionChangedListener { @Override public void onViewAttached(@NonNull MultiAutoCompleteEditText view) { editText = view; adapter = new AutoCompleteAdapter(view.getContext(), typeAdapters, delayer); editText.setAdapter(adapter); editText.setTokenizer(tokenizer); editText.addTextChangedListener(this); editText.setOnSelectionChangedListener(this); adapter.registerDataSetObserver(dataSetObserver); for (TypeAdapterDelegate adapter : typeAdapters) { adapter.registerDataSetObserver(delegateDataSetObserver); } } MultiAutoCompleteImpl(@NonNull Tokenizer tokenizer,
                          @NonNull List<TypeAdapterDelegate> typeAdapters,
                          @Nullable Delayer delayer); @Override void onViewAttached(@NonNull MultiAutoCompleteEditText view); @Override void onViewDetached(); @Override void beforeTextChanged(CharSequence s, int start, int count, int after); @Override void onTextChanged(CharSequence s, int start, int before, int count); @Override @CallSuper void afterTextChanged(Editable s); @Override boolean onSelectionChanged(int selStart, int selEnd); }
MultiAutoCompleteImpl implements MultiAutoComplete, TextWatcher, MultiAutoCompleteEditText.OnSelectionChangedListener { @Override public void onViewAttached(@NonNull MultiAutoCompleteEditText view) { editText = view; adapter = new AutoCompleteAdapter(view.getContext(), typeAdapters, delayer); editText.setAdapter(adapter); editText.setTokenizer(tokenizer); editText.addTextChangedListener(this); editText.setOnSelectionChangedListener(this); adapter.registerDataSetObserver(dataSetObserver); for (TypeAdapterDelegate adapter : typeAdapters) { adapter.registerDataSetObserver(delegateDataSetObserver); } } MultiAutoCompleteImpl(@NonNull Tokenizer tokenizer,
                          @NonNull List<TypeAdapterDelegate> typeAdapters,
                          @Nullable Delayer delayer); @Override void onViewAttached(@NonNull MultiAutoCompleteEditText view); @Override void onViewDetached(); @Override void beforeTextChanged(CharSequence s, int start, int count, int after); @Override void onTextChanged(CharSequence s, int start, int before, int count); @Override @CallSuper void afterTextChanged(Editable s); @Override boolean onSelectionChanged(int selStart, int selEnd);  }