ソースを参照

Android 增加 clearbackstack方法

wangxl 8 年 前
コミット
72f2cc928c

+ 2 - 0
display-client/assets/mobile-action.xml

@ -174,4 +174,6 @@
174 174
    	<!-- PathMenu -->
175 175
	<action name="openPathMenu" class="com.ai.ipu.ipu_pathmenu.func.MobilePathMenu" method="openPathMenu"></action>
176 176
	<action name="closePathMenu" class="com.ai.ipu.ipu_pathmenu.func.MobilePathMenu" method="closePathMenu"></action>
177

178
	<action name="clearBackStack" class="com.wade.mobile.func.MobileUI" method="clearBackStack"></action>
177 179
</actions>

+ 1 - 0
display-server/web/biz/js/common/common.js

@ -132,6 +132,7 @@ define(["jcl","mobile","clientTool"],function(Wade,Mobile,ClientTool) {
132 132
		this.logoutAccount = function(){
133 133
			if(confirm("确定要注销该工号吗?")){
134 134
				Common.remove(Constant.SESSION_ID);
135
                WadeMobile.clearBackStack();
135 136
				Mobile.openTemplate("Home");
136 137
			}
137 138
		};

+ 5 - 1
display-server/web/res/js/mobile/expand-mobile.js

@ -370,7 +370,11 @@ define(["require"],function(require) {
370 370
				execute("openPathMenu",[param]);
371 371
			},closePathMenu:function(){
372 372
				execute("closePathMenu",[]);
373
			}
373
			},clearBackStack:function(){
374
                if(WadeMobile.isAndroid()){
375
                    execute("clearBackStack",[]);
376
                }
377
            }
374 378
		};
375 379
	})();
376 380
	

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

@ -936,4 +936,14 @@ public class MobileUI extends Plugin {
936 936
		Notify notify = new Notify(context);
937 937
		notify.createNotify(content, title, icon, null, id);
938 938
	}
939

940
    public void clearBackStack(JSONArray params){
941
        context.runOnUiThread(new Runnable() {
942

943
            @Override
944
            public void run() {
945
               wademobile.getFlipperLayout().clearBackStack();
946
            }
947
        });
948
    }
939 949
}