I try to make toast function but it seems that the toast function doesn't show up when i click button.. Can someone help me to solve my case please..
public void displayText (View view){
String text = etName.getText().toString();
tvMessage.setText("Welcome! " + text);
Toast toast = Toast.makeText(MainActivity.this, "WELCOME", Toast.LENGTH_SHORT);
toast.show();
}
public void showToast() {
Toast.makeText(MainActivity.this, "Name have been reset", Toast.LENGTH_SHORT).show();
}
I try many others ways like wiping emulator but it's still doesn't work...