Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static AlertDialog.Builder dlgAlert; //Error dlgBox
- public static void displayDialogMSG(String msg, String title){
- dlgAlert.setMessage(msg);
- dlgAlert.setTitle(title);
- dlgAlert.setPositiveButton("Close",
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- //dismiss the dialog
- }
- });
- dlgAlert.setCancelable(true);
- dlgAlert.create().show();
- }
- public static void displayDialogMSG(String[] msg, String title){
- dlgAlert.setTitle(title);
- dlgAlert.setPositiveButton("Close",
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- //dismiss the dialog
- }
- });
- dlgAlert.setCancelable(true);
- dlgAlert.create().show();
- dlgAlert.setItems(msg, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int selection) {
- //File imgFile = new File(dirList[selection]);
- //deletePrivateFile(imgFile);
- }
- }).show();
- }
- public static void displayDialogData(byte data, String title){
- String byteMsg = String.valueOf(data);
- dlgAlert.setMessage(byteMsg);
- dlgAlert.setTitle(title);
- dlgAlert.setPositiveButton("Close",
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- //dismiss the dialog
- }
- });
- dlgAlert.setCancelable(true);
- dlgAlert.create().show();
- }
- public static void displayDialogData(byte[] data, String title){
- String byteList[] = new String[data.length];
- int i = 0;
- for (i = 0; i < data.length; i++)
- {
- byteList[i] = String.valueOf(data[i]);
- }
- //dlgAlert.setMessage(e.getMessage());
- dlgAlert.setTitle(title);
- dlgAlert.setPositiveButton("Close",
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- //dismiss the dialog
- }
- });
- dlgAlert.setCancelable(true);
- dlgAlert.setItems(byteList, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int selection) {
- //File imgFile = new File(dirList[selection]);
- //deletePrivateFile(imgFile);
- }
- }).create().show();
- }
- public static void displayDialogData(byte[][] data, String title){
- //String dataList[] = new String[(data.length * data[0].length)];//8x8 = 64
- String dataList[] = new String[(data.length)];//8x8 = 64
- int i = 0;
- int j = 0;
- for (i = 0; i < data.length; i++)
- {
- dataList[i] = "[" + String.valueOf(data[i][0]) + "]";
- for (j = 1; j < data[0].length; j++)
- {
- dataList[i] += ( " [" + String.valueOf(data[i][j]) + "]");
- }
- }
- //dlgAlert.setMessage(e.getMessage());
- dlgAlert.setTitle(title);
- dlgAlert.setPositiveButton("Close",
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- //dismiss the dialog
- }
- });
- dlgAlert.setCancelable(true);
- dlgAlert.setItems(dataList, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int selection) {
- //File imgFile = new File(dirList[selection]);
- //deletePrivateFile(imgFile);
- }
- }).create().show();
- }
- public static void displayDialogData(double[] data, String title){
- String dataList[] = new String[data.length];
- int i = 0;
- for (i = 0; i < data.length; i++)
- {
- dataList[i] = String.valueOf(data[i]);
- }
- //dlgAlert.setMessage(e.getMessage());
- dlgAlert.setTitle(title);
- dlgAlert.setPositiveButton("Close",
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- //dismiss the dialog
- }
- });
- dlgAlert.setCancelable(true);
- dlgAlert.setItems(dataList, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int selection) {
- //File imgFile = new File(dirList[selection]);
- //deletePrivateFile(imgFile);
- }
- }).create().show();
- }
- public static void displayDialogData(double[][] data, String title){
- //String dataList[] = new String[(data.length * data[0].length)];//8x8 = 64
- String dataList[] = new String[(data.length)];//8x8 = 64
- int i = 0;
- int j = 0;
- for (i = 0; i < data.length; i++)
- {
- dataList[i] = "[" + String.valueOf(data[i][0]) + "]";
- for (j = 1; j < data[0].length; j++)
- {
- dataList[i] += ( " [" + String.valueOf(data[i][j]) + "]");
- }
- }
- //dlgAlert.setMessage(e.getMessage());
- dlgAlert.setTitle(title);
- dlgAlert.setPositiveButton("Close",
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- //dismiss the dialog
- }
- });
- dlgAlert.setCancelable(true);
- dlgAlert.setItems(dataList, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int selection) {
- //File imgFile = new File(dirList[selection]);
- //deletePrivateFile(imgFile);
- }
- }).create().show();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement