浏览代码

移除自定义更新对话框

leijie 8 年之前
父节点
当前提交
8969b6a66f

+ 7 - 9
display-client/src/com/ai/ipu/display/MainActivity.java

@ -8,8 +8,6 @@ import android.os.Bundle;
8 8
import android.util.DisplayMetrics;
9 9
import android.view.View;
10 10
11
import com.ai.ipu.display.ui.CustomUpdateProgressDialog;
12
import com.ai.ipu.mgr.downloadMgr.DownloadMgr;
13 11
import com.ai.ipu.mobile.app.AppInfoUtil;
14 12
import com.ai.ipu.mobile.app.AppRecord;
15 13
import com.ai.ipu.mobile.app.ApplicationManager;
@ -228,13 +226,13 @@ public class MainActivity extends TemplateMainActivity {
228 226
		return false;
229 227
	}
230 228
	
231
	@Override
232
	protected void updateClient() {
233
		IUpdateDialog updateProgressDialog = new CustomUpdateProgressDialog(this);
234
		AutoUpdate autoUpdate = new AutoUpdate(this, MobileConfig.getInstance().getAppPath(),
235
				updateProgressDialog);
236
		autoUpdate.update();
237
	}
229
//	@Override
230
//	protected void updateClient() {
231
//		IUpdateDialog updateProgressDialog = new CustomUpdateProgressDialog(this);
232
//		AutoUpdate autoUpdate = new AutoUpdate(this, MobileConfig.getInstance().getAppPath(),
233
//				updateProgressDialog);
234
//		autoUpdate.update();
235
//	}
238 236
	
239 237
//	@Override
240 238
//	protected void updateClient() {

+ 0 - 41
display-client/src/com/ai/ipu/display/ui/CustomUpdateProgressDialog.java

@ -1,41 +0,0 @@
1
package com.ai.ipu.display.ui;
2
3
import com.ai.ipu.mobile.ui.comp.dialog.IUpdateDialog;
4
5
import android.content.Context;
6
import cn.pedant.SweetAlert.SweetAlertDialog;
7
8
public class CustomUpdateProgressDialog implements IUpdateDialog{
9
	private Context context;
10
	private SweetAlertDialog updateProgressDialog;
11
	
12
	public CustomUpdateProgressDialog(Context context) {
13
		super();
14
		this.context = context;
15
		
16
	}
17
18
	@Override
19
	public void show() {
20
		updateProgressDialog= new SweetAlertDialog(context, SweetAlertDialog.NUMBERPROGRESSBAR_TYPE);
21
		updateProgressDialog.setTitleText("");
22
		updateProgressDialog.setContentText("下载中...");
23
		updateProgressDialog.show();
24
	}
25
26
	@Override
27
	public void setMax(int maxSize) {
28
		updateProgressDialog.setNumberMax(maxSize);
29
	}
30
31
	@Override
32
	public void setProgress(int progressSize) {
33
		updateProgressDialog.setNumberProgress(progressSize);
34
	}
35
36
	@Override
37
	public void dismiss() {
38
		updateProgressDialog.dismiss();
39
	}
40
41
}

+ 41 - 0
display-client/src/com/ai/ipu/display/ui/CustomUpdateProgressDialog.java.bak

@ -0,0 +1,41 @@
1
//package com.ai.ipu.display.ui;
2
//
3
//import com.ai.ipu.mobile.ui.comp.dialog.IUpdateDialog;
4
//
5
//import android.content.Context;
6
//import cn.pedant.SweetAlert.SweetAlertDialog;
7
////自定义更新下载对话框
8
//public class CustomUpdateProgressDialog implements IUpdateDialog{
9
//	private Context context;
10
//	private SweetAlertDialog updateProgressDialog;
11
//	
12
//	public CustomUpdateProgressDialog(Context context) {
13
//		super();
14
//		this.context = context;
15
//		
16
//	}
17
//
18
//	@Override
19
//	public void show() {
20
//		updateProgressDialog= new SweetAlertDialog(context, SweetAlertDialog.NUMBERPROGRESSBAR_TYPE);
21
//		updateProgressDialog.setTitleText("");
22
//		updateProgressDialog.setContentText("下载中...");
23
//		updateProgressDialog.show();
24
//	}
25
//
26
//	@Override
27
//	public void setMax(int maxSize) {
28
//		updateProgressDialog.setNumberMax(maxSize);
29
//	}
30
//
31
//	@Override
32
//	public void setProgress(int progressSize) {
33
//		updateProgressDialog.setNumberProgress(progressSize);
34
//	}
35
//
36
//	@Override
37
//	public void dismiss() {
38
//		updateProgressDialog.dismiss();
39
//	}
40
//
41
//}