1 /**
2 * @author huanghuang
3 */
4 Ext.application({
5 // name:'LocatCam',
6 launch:function(){
7 Ext.create('Ext.Container', {
8 fullscreen: true,
9 padding: 4,
10 // width:'50%',
11 items: [
12 {
13 xtype:'button',
14 ui: 'normal',
15 text: 'photo',
16 width:80,
17 handler:function(){
18 // alert('hello my name is huanghuang!');
19 // 等待加载PhoneGap
20 document.addEventListener("deviceready", onDeviceReady, false);
21
22 // PhoneGap加载完毕
23 function onDeviceReady() {
24 // 空
25 }
26
27 // 警告对话框被忽视
28 function alertDismissed() {
29 // 进行处理
30 }
31 navigator.notification.alert(
32 'You are the winner!', // 显示信息
33 alertDismissed, // 警告被忽视的回调函数
34 'Game Over', // 标题
35 'Done' // 按钮名称
36 );
37 }
38 }
39 ]
40 });
41 }
42 });