I really don't know what caused this, but Toasts in my application are no longer showing up.
How do I display a Toast: Toast.makeText(getApplicationContext(), "Toast...", Toast.LENGTH_SHORT).show();
I've checked Toast.java and it seems that there are some symbols that cannot be resolved: IntDef, INotificationManager, ITransientNotification.
I have tried rebuilding and cleaning up the project but no success.
EDIT: NumberList activity code:
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class NumberList extends Activity implements OnClickListener{
private RemindersDbAdapter mDbAdapter;
private EditText numbr;
private EditText name;
private Button btnAdd;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.list_layout);
mDbAdapter=new RemindersDbAdapter(this);
mDbAdapter.open();
numbr=(EditText) findViewById(R.id.editNumber);
name = (EditText) findViewById(R.id.editName);
btnAdd=(Button) findViewById(R.id.btnSave);
btnAdd.setOnClickListener(this);
}
public void onClick(View v) {
switch (v.getId()) {
case R.id.btnSave:
if((numbr.getText().toString()!=null)&&(numbr.getText().toString().length()>=3)&&(numbr.getText().toString().length()<=20)) {
mDbAdapter.createReminder(numbr.getText().toString() , name.getText().toString(), "");
mDbAdapter.close();
finish();
}
else {
Toast.makeText(getApplicationContext(), "Please enter a correct number", Toast.LENGTH_SHORT).show();
}
default:
break;
}
}
@Override
protected void onDestroy() {
// TODO Auto-generated method stub
super.onDestroy();
mDbAdapter.close();
}
}