Commit 0d385abe7559b8a601f93c506bdc0640376dd9ab

Authored by perry.werneck@gmail.com
1 parent d3c899e3

Work in progress

android/src/br/com/bb/pw3270/PW3270Activity.java
... ... @@ -7,17 +7,21 @@ import android.widget.Button;
7 7 import android.widget.EditText;
8 8 import android.view.View;
9 9 import android.content.res.*;
  10 +import android.app.AlertDialog;
  11 +import android.app.Dialog;
10 12  
11 13 public class PW3270Activity extends Activity implements View.OnClickListener
12 14 {
13   -
14 15 private class terminal extends lib3270
15 16 {
16 17 TextView view;
  18 + Activity Main;
  19 +
17 20  
18   - terminal(TextView view)
  21 + terminal(TextView view, Activity Main)
19 22 {
20 23 this.view = view;
  24 + this.Main = Main;
21 25  
22 26 }
23 27  
... ... @@ -28,7 +32,25 @@ public class PW3270Activity extends Activity implements View.OnClickListener
28 32  
29 33 public void popupMessage(int type, String title, String text, String info)
30 34 {
31   - this.view.setText(title + "\n" + text + "\n" + info);
  35 + AlertDialog d = new AlertDialog.Builder(Main).create();
  36 + d.setTitle(title);
  37 + d.setMessage(text);
  38 +
  39 +
  40 + /*
  41 + d.setButton("OK", new DialogInterface.OnClickListener()
  42 + {
  43 + public void onClick(DialogInterface dialog, int which)
  44 + {
  45 +
  46 + //here you can add functions
  47 +
  48 + }
  49 + });
  50 + */
  51 +
  52 + d.show();
  53 +// this.view.setText(title + "\n" + text + "\n" + info);
32 54 }
33 55  
34 56  
... ... @@ -54,7 +76,8 @@ public class PW3270Activity extends Activity implements View.OnClickListener
54 76 Button btn = (Button) findViewById(R.id.connect);
55 77 btn.setOnClickListener((View.OnClickListener) this);
56 78  
57   - host = new terminal((TextView) findViewById(R.id.text));
  79 + host = new terminal((TextView) findViewById(R.id.text),this);
  80 +
58 81  
59 82 }
60 83  
... ...