Kewin Björk Nielsen Kewin Björk Nielsen - 11 months ago 42
Android Question

how do you get strings from the xml on the toast

how do i get my strings from the xml in on my toast


<string name="Pic_taken">Billedet er nu blevet taget! </string>

in on this

Toast.makeText(getApplicationContext(), "Billedet er nu blevet taget!", Toast.LENGTH_SHORT).show();


Like this:

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