|
@ -93,10 +93,11 @@ public class MobileUI extends Plugin {
|
93
|
93
|
JSONArray buttons = param.optJSONArray(2);
|
94
|
94
|
JSONArray arrayStyles = param.optJSONArray(3);
|
95
|
95
|
boolean isHideTopBar = param.optBoolean(4, false);
|
96
|
|
openUrl(url, !isHideTopBar, title, buttons, arrayStyles);
|
|
96
|
JSONArray isHideIcons = param.optJSONArray(5);
|
|
97
|
openUrl(url, !isHideTopBar, title, buttons, arrayStyles,isHideIcons);
|
97
|
98
|
}
|
98
|
99
|
|
99
|
|
private void openUrl(String url, boolean isShowTopBar, String title, JSONArray buttons, JSONArray arrayStyles) throws Exception {
|
|
100
|
private void openUrl(String url, boolean isShowTopBar, String title, JSONArray buttons, JSONArray arrayStyles,JSONArray isHideIcons) throws Exception {
|
100
|
101
|
String[] styleNames = {"topbarbg", "iconcolor", "textcolor"};
|
101
|
102
|
url = URLDecoder.decode(url);
|
102
|
103
|
Intent intent = new Intent();
|
|
@ -119,6 +120,14 @@ public class MobileUI extends Plugin {
|
119
|
120
|
if(buttons != null) {
|
120
|
121
|
intent.putExtra("buttons", buttons.toString());
|
121
|
122
|
}
|
|
123
|
|
|
124
|
if(isHideIcons != null){
|
|
125
|
boolean[] hideIcons = new boolean[isHideIcons.length()];
|
|
126
|
for(int i = 0;i < isHideIcons.length(); i++){
|
|
127
|
hideIcons[i] = isHideIcons.getBoolean(i);
|
|
128
|
}
|
|
129
|
intent.putExtra("isHideIcons",hideIcons);
|
|
130
|
}
|
122
|
131
|
|
123
|
132
|
intent.setClassName(context, "com.ai.ipu.mobile.ui.activity.IpuUrlActivity");
|
124
|
133
|
startActivityForResult(intent, REQUEST_CODE_OPEN_URL);
|