예제 #1
0
 public static void createDialog() {
   dialog = new TestDialog(new Frame(), "Instructions");
   String[] defInstr = {"Instructions will appear here. ", ""};
   dialog.printInstructions(defInstr);
   dialog.show();
   println("Any messages for the tester will display here.");
 }
예제 #2
0
 @Override
 public void onClick(View arg0) {
   switch (arg0.getId()) {
     case R.id.buttonTest:
       // 实例化TestDialog,可以传参数进去,例如标题,或者其他参数,还有一个唯一码.
       TestDialog dialog = new TestDialog().newInstance("请输入", 1, mstrName, mstrHigh);
       dialog.show(this.getSupportFragmentManager(), "TestDialog");
       break;
     default:
       break;
   }
 }
예제 #3
0
 public static void createDialogWithInstructions(String[] instructions) {
   dialog = new TestDialog(new Frame(), "Instructions");
   dialog.printInstructions(instructions);
   dialog.show();
   println("Any messages for the tester will display here.");
 }