Android custom dialog gives an error
问题 In my android app I have to popup a dialog on a button click event . But when I click on the button the app stops working. I load the pre designed layout into the dialog. I will post a code segment. Button login = (Button) findViewById(R.id.btn_login); login.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { final Dialog dialog = new Dialog(getApplication()); dialog.setContentView(R.layout.journey_details); dialog.setTitle("Android Custom Dialog Box"); Button