0
Need to put a Edittext to fill the name... ie when the user click the button will appear a Alertdialog, which should put the name of the player, I did up to a step, here in Sopt has a question of this type only that can not solve.
Could someone help me?
Code:
package com.gif.popupsair;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
public class MyCaixa extends DialogFragment{
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builderr = new AlertDialog.Builder(getActivity());
builderr.setMessage("Nome do jogador")
.setPositiveButton("Salvar", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
}).setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
builderr.setTitle("Golll!");
AlertDialog dialog = builderr.create();
return dialog;
}
}
Thank you.
Thanks for the tip...
– Nathan