Pārlūkot izejas kodu

扩展Mobile.back()方法,支持子应用退回主应用的场景

chengwb3 8 gadi atpakaļ
vecāks
revīzija
abc6aecc9a

+ 7 - 0
wade-mobile-func/src/com/wade/mobile/func/MobileUI.java

@ -411,6 +411,13 @@ public class MobileUI extends Plugin {
411 411
		if (mainFlipper != null) {
412 412
//			Runtime runtime = Runtime.getRuntime();
413 413
//			runtime.exec("input keyevent " + KeyEvent.KEYCODE_BACK);
414
		    
415
            // add by chengwb3 android子应用回退主应用使用
416
            if (!mainFlipper.isCanBack()) {
417
                context.finish();
418
                return;
419
            }
420
            
414 421
			final String tag = param.getString(0);
415 422
			if(!isNull(tag)){
416 423
				context.runOnUiThread(new Runnable() { public void run() {