Browse Source

Android 增加 clearbackstack方法

wangxl 8 years ago
parent
commit
72f2cc928c

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

174
    	<!-- PathMenu -->
174
    	<!-- PathMenu -->
175
	<action name="openPathMenu" class="com.ai.ipu.ipu_pathmenu.func.MobilePathMenu" method="openPathMenu"></action>
175
	<action name="openPathMenu" class="com.ai.ipu.ipu_pathmenu.func.MobilePathMenu" method="openPathMenu"></action>
176
	<action name="closePathMenu" class="com.ai.ipu.ipu_pathmenu.func.MobilePathMenu" method="closePathMenu"></action>
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
</actions>
179
</actions>

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

132
		this.logoutAccount = function(){
132
		this.logoutAccount = function(){
133
			if(confirm("确定要注销该工号吗?")){
133
			if(confirm("确定要注销该工号吗?")){
134
				Common.remove(Constant.SESSION_ID);
134
				Common.remove(Constant.SESSION_ID);
135
                WadeMobile.clearBackStack();
135
				Mobile.openTemplate("Home");
136
				Mobile.openTemplate("Home");
136
			}
137
			}
137
		};
138
		};

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

370
				execute("openPathMenu",[param]);
370
				execute("openPathMenu",[param]);
371
			},closePathMenu:function(){
371
			},closePathMenu:function(){
372
				execute("closePathMenu",[]);
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
		Notify notify = new Notify(context);
936
		Notify notify = new Notify(context);
937
		notify.createNotify(content, title, icon, null, id);
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
}