You have to use your own layout of one view / button inside , and based on this click of the mouse / button you can create another dailog without canceling the first one, if you use builder.setNegativeButton or builder.setPositiveButton your current dialog will be closed , my working code is like,
AlertDialog.Builder builder = new AlertDialog.Builder(ActivityAppImages.this,R.style.your_style); LayoutInflater inflater = getLayoutInflater(); View dialoglayout = inflater.inflate(R.layout.your_custom_layout, null); final Button mButtonCreateOtherDailog = (Button)dialoglayout.findViewById(R.id.txt_create_second_dailog); mTextView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) {
source share