2017-08-02 5 views
0

カスタムUI5アプリケーションでカスタム.gifファイルプリローダーを使用する方法。ポップアップやナビゲーションのためのボタンをクリックすると遅延。以下は SAPUI5のカスタムGifローダー

は私のコードです

<content> 
     <Button 
      text="Dialog" 
      width="230px" 
      press="onDialogPress" 
      class="sapUiSmallMarginBottom" /> 
    </content> 

onDialogPress: function(oEvent) { 

    var that = this; 
    if (!that.pressDialog) { 
     that.pressDialog = new sap.m.BusyDialog({ 
      text: 'Loading...', 
     }); 

     //to get access to the global model 
     this.getView().addDependent(that.pressDialog); 
    } 

    that.pressDialog.open(); 
}, 

答えて

1

BusyDialogは、カスタムイメージを追加するオプションがあります:

onDialogPress: function(oEvent) { 
    if (!this.pressDialog) { 
     this.pressDialog = new sap.m.BusyDialog({ 
      text: 'Loading...', 
      customIcon: './stackoverflow/loading.gif', 
      customIconRotationSpeed: 0, 
      customIconWidth: '48px', 
      customIconHeight: '48px' 
     }); 
     this.getView().addDependent(that.pressDialog); 
    } 
    this.pressDialog.open(); 
} 

結果:それは正常に動作します
enter image description here

+0

:)あなたにラーフルありがとう – Archana

関連する問題