package com.example.kiosk.dialog;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.DialogInterface;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
DisplayDialog();
}
private void DisplayDialog() {
Builder MyDialogBuilder = new AlertDialog.Builder(this);
MyDialogBuilder.setTitle("Warning");
MyDialogBuilder.setMessage("Hello World!");
MyDialogBuilder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
MyDialogBuilder.show();
}
========================
UIAlertView in iOS Swift
No comments:
Post a Comment