Simple Alert
Button toast, alertdialog, customalertdialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_massage_view);
toast = findViewById(R.id.toast);
alertdialog = findViewById(R.id.alertdialog);
customalertdialog = findViewById(R.id.customalertdialog);
toast.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(MassageView.this, "My Name is Cecep", Toast.LENGTH_LONG).show();
}
});
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_massage_view);
toast = findViewById(R.id.toast);
alertdialog = findViewById(R.id.alertdialog);
customalertdialog = findViewById(R.id.customalertdialog);
toast.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(MassageView.this, "My Name is Cecep", Toast.LENGTH_LONG).show();
}
});
Komentar
Posting Komentar