Question

  

Possible en double:    comment changer de position de Toast dans Android?

Je dois montrer un Toast, lorsque l'utilisateur appuie sur une Button, mais je veux montrer un peu plus sur le screen.

Comment puis-je faire?

Voici le code de mon Toast:

Toast.makeText(getApplicationContext(),
getString(R.string.emailregisternotentered),
Toast.LENGTH_SHORT).show();

Résolu:

Toast toast= Toast.makeText(getApplicationContext(), 
getString(R.string.emailregisternotentered), Toast.LENGTH_SHORT);  
//Toast.makeText(getApplicationContext(), getString(R.string.emailregisternotentered),
//Toast.LENGTH_SHORT).show();
toast.setGravity(Gravity.BOTTOM, 0, 0);
toast.show();
Était-ce utile?

Autres conseils

Toast.setGravity est une option.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top