1
I have a problem, inside a Alertdialog there is an Edittext, but it always gets very big and very close to the margins, I want to make it smaller and centered in the middle of Alertdialog, I tried to give padding but I was not successful
My code is like this:
private void Add(){
AlertDialog.Builder alertDialog = new AlertDialog.Builder(MainActivity.this);
alertDialog.setTitle("Adicionar Contato");
alertDialog.setMessage("Email do contato");
alertDialog.setCancelable(false);
int textoBranco = Color.WHITE;
final EditText editText = new EditText(getApplicationContext());
alertDialog.setView(editText);
editText.setTextColor(textoBranco);
I want to make this text field smaller
The code solved the problem of aligning the text, but did not decrease the size of Edittext
– BulletSentence
@Bulletsentence I did an edit on it, try now.
– Andrei Coelho
Still nothing, the command is decreasing the size of the text, but I want to decrease is the box where the text is typed, leave it with padding 8dp
– BulletSentence
@Bulletsentence has worked now?
– Andrei Coelho
It worked, but creating a Batman for him!
– BulletSentence
@Bulletsentence blz mano! Anything from a "save" here! = ) Hug!
– Andrei Coelho