Instead of using a FragmentDialog use a Dialog . He is probably resetting his screen because he is calling a new Activity .
Using Dialog you can call a layout by creating in xml and give a findViewById in every view of it. You can also send variables and objects from your Activity to Dialog leaving them static or final.
To close Dialog you have to give dismiss () and it returns to your activity without creating a new one. Here's an example of how to create a Dialog with a button layout.
final Dialog dialog = new Dialog(v.getContext());
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.layout_que_vc_criou);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
Button btnSair = (Button) dialog.findViewById(R.id.btnSair);
btnSair.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
}
});
dialog.show();