Instead of you wearing one Fragmentdialog use a Dialog. He’s probably resetting his screen because he’s calling a new one Activity.
Using the Dialog you can call a layout creating in xml and give a findViewById in every view of it. You can also send variables and objects from your Activity to the Dialog leaving them static or final.
To close the Dialog you have to give a Dismiss() and he returns to his Activity without creating a new one. Ai ta um exemple de como criar um Dialog with a one 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();
Hello, Pedro. Welcome. We need to see the code to get an idea of what’s going on.
– Pablo Almeida