如何創建取消和PhoneGap的OK按鈕使用PhoneGap.exec(null, null, "Notification", "activityStart", ["Downloading file","Please wait..."]);
如何在phonegap .exec提醒框中創建Phonegap取消按鈕?
1
A
回答
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評論
1
navigator.notification.confirm(
'Do you want to signout and close the application?', // message
onConfirm, // callback to invoke with index of button pressed
'Sign Out', // title
'Sign Out,Cancel' // buttonLabels
);
和
function onConfirm(button) {
//action for confirmation
}
參考 http://docs.phonegap.com/en/1.2.0/phonegap_notification_notification.md.html
相關問題
- 1. 如何在文本框中創建取消按鈕?
- 2. 的SharePoint 2010:創建「提醒我」按鈕
- 3. 取消提醒對話框
- 4. 在javascript中創建提醒消息
- 5. 如何在phonegap中創建相冊?
- 6. 的PhoneGap + JQuery_Mobile:如何在一個按鈕
- 7. 如何創建取消按鈕?
- 8. iOS Phonegap像按鈕(phonegap-plugin-facebook-connect)
- 9. 如何使點擊按鈕時從按鈕提醒對話框?
- 10. phonegap android GO按鈕不提交表格
- 11. JQuery + PhoneGap - 自定義通知提醒
- 12. 如果沒有互聯網連接(PhoneGap),如何顯示消息/圖片提醒?
- 13. Xcode提醒按鈕
- 14. 在Extjs中提示提醒消息框
- 15. 如何點擊jquery中的按鈕和提醒消息?
- 16. 使用Phonegap獲取軟鍵盤按鈕
- 17. 日期選擇器插件PhoneGap的取消按鈕
- 18. 如何在greasemonkey中創建隱藏/取消隱藏按鈕
- 19. 使用phonegap捕捉iPhone中的中心/ HOME按鈕使用phonegap
- 20. JavaScript提示框取消按鈕?
- 21. 使li元素按鈕phonegap
- 22. phonegap動態javascript按鈕
- 23. 隱藏PhoneGap ChildBrowser按鈕
- 24. Phonegap按鈕點擊事件
- 25. javascript提示框沒有取消按鈕?
- 26. PhoneGap-iOS,如何用紅色按鈕顯示對話框?
- 27. 如何在iPhone日曆上創建提醒和商店提醒
- 28. 使用javascript創建Phonegap ios應用程序的後退按鈕
- 29. phonegap在安卓系統上的提醒中斷
- 30. 我如何給setfocus提醒按鈕?
是的,我需要爲Android – Raj 2012-04-14 03:54:18
JST嘗試的部份次讓我KNW反饋... – user1140237 2012-04-16 07:00:53