I am going to use a toast in my application for testing. I am new to Android and I am not very familiar with toasts. I know the standard toast like this: Toast.makeText(context, text, duration).show(); . However, instead of applying a line of text to the "text" section, I want to apply a variable.
Here is what I wrote:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_screen_next); Button send = (Button) findViewById(R.id.bSend);
cText is a variable used in another method present in the class. Any suggestions on how I can get a toast to contain cText content? Thanks in advance.
source share