如何自定义 IBM Mobile First 直接下载屏幕?
How to customise IBM Mobile First Direct Download Screen?
在 IBM Mobile First Direct Download Screen 中可以自定义什么?
(例如,与应用程序主题相匹配的颜色、文字显示...)等...)
例如:我想将背景更改为红色,将加载栏更改为红色,并将 "Downloading" 字样更改为正在更新...
您不能简单地更新 UI。为了能够自定义第二个直接更新对话框(即屏幕截图中的那个),这将需要您控制 direct update flow entirely,这意味着您需要非常小心...
Learn more in the user documentation
var directUpdateCustomListener = {
onStart: function(totalSize){
//show custom progress dialog
},
onProgress: function(status,totalSize,completedSize){
//update custom progress dialog
},
onFinish: function(status){
if (status == 'SUCCESS'){
//show success message
WL.Client.reloadApp();
}
else {
//show custom error message
//submitFailure must be called is case of error
wl_directUpdateChallengeHandler.submitFailure();
}
}
};
wl_directUpdateChallengeHandler.handleDirectUpdate = function(directUpdateData, directUpdateContext){
WL.SimpleDialog.show('Update Avalible', 'Press update button to download version 2.0', [{
text : 'update',
handler : function() {
directUpdateContext.start(directUpdateCustomListener);
}
}]);
};
在 IBM Mobile First Direct Download Screen 中可以自定义什么? (例如,与应用程序主题相匹配的颜色、文字显示...)等...)
例如:我想将背景更改为红色,将加载栏更改为红色,并将 "Downloading" 字样更改为正在更新...
您不能简单地更新 UI。为了能够自定义第二个直接更新对话框(即屏幕截图中的那个),这将需要您控制 direct update flow entirely,这意味着您需要非常小心...
Learn more in the user documentation
var directUpdateCustomListener = {
onStart: function(totalSize){
//show custom progress dialog
},
onProgress: function(status,totalSize,completedSize){
//update custom progress dialog
},
onFinish: function(status){
if (status == 'SUCCESS'){
//show success message
WL.Client.reloadApp();
}
else {
//show custom error message
//submitFailure must be called is case of error
wl_directUpdateChallengeHandler.submitFailure();
}
}
};
wl_directUpdateChallengeHandler.handleDirectUpdate = function(directUpdateData, directUpdateContext){
WL.SimpleDialog.show('Update Avalible', 'Press update button to download version 2.0', [{
text : 'update',
handler : function() {
directUpdateContext.start(directUpdateCustomListener);
}
}]);
};