android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
HA HA HA !!!, You entrapped again in this error. Yes, if you are developing apps for a long time than definitely you faced this issue several times. If your answer is 'NO' than your developing skills are good or may be you didn't face it because you are a fresher. Or if answer is 'YES' than buddy, you forgot something in hurry. you know what is it ?
private void ShowPopup(){
ReplyDeletefinal Dialog dialog = new Dialog(mcontext, R.style.CustomDialog);
Log.e("Dialog",""+dialog);
// nestedScrollView.setBackgroundColor(Color.parseColor("#526565"));
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.contact_popup);
dialog.setCanceledOnTouchOutside(false);
dialog.getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
contactmobile = dialog.findViewById(R.id.contact_mobile);
contactname = dialog.findViewById(R.id.contact_name);
ok = dialog.findViewById(R.id.ok);
// email.setText(mPostData.get(contact.getId()).getEmail());
// mobile.setText(mPostData.get(contact.getId()).getMobile());
ok.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Intent intent =new Intent(mcontext,LoginActivity.class);
// mcontext.startActivity(intent);
resend1();
//dialog.dismiss();
}
});
dialog.show();
}
is not working this adapter class
ReplyDeleteEmperor Casino
ReplyDeletePlay online casino games at Empire Casino | Try 1xbet for Real Money | No Download and No Registration | No Deposit Required | Join Now! | T&C's Apply! 인카지노 Rating: 3.9 · 제왕카지노 3 votes · Free · Game