Kewin Björk Nielsen Kewin Björk Nielsen - 1 year ago 65
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();

Answer Source

Like this:

Toast.makeText(getApplicationContext(), getString(R.string.Pic_taken), Toast.LENGTH_SHORT).show();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download