J'utilise AlertDialog mais android ajoute un espace blanc au bas de AlertDialog.AlertDialog partie blanche à la fin
Je trouve que le problème se produit quand on utilise les
alertDialog.getWindow().setLayout(600, 400);
La création de AlertDialog se fait comme:
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setView(layout);
alertDialog = builder.create();
alertDialog.show();
alertDialog.getWindow().setLayout(600, 400); //Controlling width and height.
Je montre la AlertDialog dans une classe de Fragment et classe Fragment appartient à AppCompatActivity.
Comment supprimer cet espace blanc?
pouvez-vous partager screenshot –
J'ai ajouté ma capture d'écran de la tablette. Ci-dessous du fond il y a un espace blanc. – nihasmata
c'est à cause de alertDialog.getWindow(). SetLayout (600, 400); –