-2
I have a Button inside a Basedapter where relates the production orders of my APP, the Onclick of that button should open a Dialog with a new basedapter, but is giving the following Exception:
Caused by: java.lang.Runtimeexception: Can’t create Handler Inside thread that has not called Looper.prepare()
Creation of the Dialog:
DialogLotesPrensa mDialogLotesPrensa = new DialogLotesPrensa(mContext, ordem);
mDialogLotesPrensa.show();
In the Dialog onCreate event:
public DialogLotesPrensa(Context context , Ordens ordem ) {
super(context , R.style.Theme_Dialog);
this.mContext = context;
this.mOrdem = ordem;
//this.mOnSelecionaLotePrensa = onSelecionaLotePrensa;
this.setContentView(R.layout.activity_lista_series);
this.setCancelable(false);
this.setCanceledOnTouchOutside(false);
setupDialogElements();
}
The exception is occurring in the super(context, R.style.Theme_dialog);
Can someone help out?