I'm looking to expand the spinner without needing to physically touch it. I've tried the following and nothing seems to work:
toolbar = (Toolbar) findViewById(R.id.toolbar);
spinner = (MaterialToolbarSpinner)
toolbar.findViewById(R.id.mt_spinner);
spinnerAdapter = new ToolbarSpinnerAdapter(this);
spinnerAdapter.setUserAgencyList(agencies);
spinner.setAdapter(spinnerAdapter);
spinner.setOnItemSelectedListener(this);
spinner.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
}
});
// spinner.performClick();
// spinner.callOnClick();
// spinner.animate();
// spinner.notify();
// spinner.post(new Runnable() {
// @Override
// public void run() {
// spinner.performClick();
// }
// });
// spinnerAdapter.getDropDownView(0, null, toolbar);
// spinnerAdapter.getDownView(0, null, toolbar);
// spinner.requestFocus();
// toolbar.getFocusedChild().performClick();
// toolbar.performClick();
It seems that the spinner's onClick() method is never called when physically tapping the component.
I'm looking to expand the spinner without needing to physically touch it. I've tried the following and nothing seems to work:
It seems that the spinner's onClick() method is never called when physically tapping the component.