Remove title space in Alertdialog

Asked

Viewed 60 times

1

I have the following dialog in my application

Um campo de senha não preenchido com um botão de cancelar e um de aceitar embaixo, tudo isso dentro de um retângulo branco. O fundo da tela é preto e, abaixo do retângulo branco, a frase "A Globo censurou". Abaixo da frase, um teclado numérico está sendo exibido.

As you can see, in it I will not use Titulo (nomequalquer.setTitle("blabla")) nor Message. I would like to know what I can do so that this white space where the title of about 50dp would be.

1 answer

1


Just add before the dialog.setContentView(R.layout.seulayout) and right after instantiating your dialog, the following line: dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);

  • 1

    Perfect! Thank you very much.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.