【问题标题】:IBM Worklight 6.1 - How to customize WL.BusyIndicator's height and width?IBM Worklight 6.1 - 如何自定义 WL.BusyIndi​​cator 的高度和宽度?
【发布时间】:2013-12-26 11:35:04
【问题描述】:

我在ios 环境的worklight 6.1 版本中使用busyindicator,我想知道如何增加指示器的高度和宽度。显示我正在使用的繁忙指示器的代码

busyInd = new WL.BusyIndicator('content', {text : 'Loading Data Please Wait....'});
busyInd.show()  //for showing indicator 
busyInd.hide()  // for Hiding indicator  

它向我显示busyIndi​​cator,但它非常小并且文本太长而无法正确显示。我想自定义高度和宽度。我可以这样做吗,或者有什么方法可以这样做,或者你可以为我提供语法。

【问题讨论】:

  • Vishal,当您提出问题时,您还需要提及您为其构建应用程序的 Worklight 环境。否则我们无法为您提供帮助。请始终提供完整的详细信息。
  • K,我更新了我的问题。请检查这是针对ios 环境的。

标签: ibm-mobilefirst worklight-runtime


【解决方案1】:

您需要使用boxLength 属性as mentioned in the documentation for WL.BusyIndicator

例如在common\main.js:

var busy;

function wlCommonInit(){
    busy = new WL.BusyIndicator ("content", {text : 'Loading Data Please Wait....', boxLength: 255.5});
    busy.show();
}

附: 这里有一个轻微的文档问题;我已经打开了一个缺陷来纠正它。

【讨论】:

  • 谢谢它对我有用,但请让我知道'boxLength:255.5'的高度和宽度是多少。因为我无法区分。它总是向我显示方形框,或者它是指标的行为。
  • 255.5是宽度,高度是根据这个值自动计算出来的。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-07-03
  • 2017-10-31
  • 1970-01-01
  • 1970-01-01
  • 2021-09-11
  • 2017-09-28
相关资源
最近更新 更多