Android examples for User Interface:Dialog
get About Dialog
//package com.java2s; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; public class Main { public static AlertDialog getAboutDialog(final Activity activity) { String message = "This is a test\n\nIf you have any feedback, requests or complaints, please let me know!. \n\nHappy tagging!"; AlertDialog.Builder builder = new AlertDialog.Builder(activity); builder.setTitle("About") // .setIcon(android.R.drawable.ic_dialog_info) // .setMessage(message)// ww w.j a v a 2 s .c om // .setCancelable(false) // .setPositiveButton("Send Feedback", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Intent intent = new Intent( android.content.Intent.ACTION_SEND); intent.setType("plain/text"); intent.putExtra( android.content.Intent.EXTRA_EMAIL, new String[] { "touchatag.android@gmail.com" }); intent.putExtra( android.content.Intent.EXTRA_SUBJECT, "Feedback on Android App"); activity.startActivity(intent); } }) .setNegativeButton("Close", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.dismiss(); } }); return builder.create(); } }