I am encountering the following issue. I have the following lines of code :
Spinner domainSpinner = (Spinner) findViewById(R.id.domain);
domainSpinner.setVisibi
You can try this. Make sure the domainSpinner is initialized on the Main Thread. Also add a condition for setting visibility only when domainSpinner is not equal to null.
Handler mainHandler = new Handler(context.getMainLooper());
mainHandler.post(new Runnable() {
@Override
public void run() {
Spinner domainSpinner = (Spinner) findViewById(R.id.domain);
if(domainSpinner!=null) {
domainSpinner.setVisibility(View.VISIBLE);
}
}
});