2012-04-11 65 views

回答

0

請註明您要申請的PhoneGap插件(IOS,安卓)以下 界河技術是代碼,這將幫助您創建的Android核心alertbox 通話這個功能上執行方法

public synchronized void customalertBox(final String callBackId, JSONArray jarray) { 
      final AlertDialog showCustomDialog = null; 
      final Runnable runnable = new Runnable() { 

       @Override 
       public void run() { 
        AlertDialog.Builder customdialog = new AlertDialog.Builder(null); 
        showCustomDialog.setButton2("OK", new OnClickListener() { 

         @Override 
         public void onClick(DialogInterface dialog, int which) { 
          customalertPLUGIN.success(new PluginResult(
            PluginResult.Status.OK, setJSONDataTORETURN), 
            callBackId); 
          showCustomDialog.dismiss(); 

         } 
        }); 
        showCustomDialog.setButton2("Cancel", new OnClickListener() { 

         @Override 
         public void onClick(DialogInterface dialog, int which) { 
          customalertPLUGIN 
            .error(new PluginResult(
              PluginResult.Status.INVALID_ACTION), 
              callBackId); 
          showCustomDialog.dismiss(); 

         } 
        }); 
        showCustomDialog = customdialog.create(); 
        showCustomDialog.setCancelable(true); 
        showCustomDialog.show(); 

       } 

      }; 
     } 

希望的部份將有助於you.leave評論

+0

是的,我需要爲Android – Raj 2012-04-14 03:54:18

+0

JST嘗試的部份次讓我KNW反饋... – user1140237 2012-04-16 07:00:53