デバイスモデルを作成し、そのプロパティを使用して、アプリケーションが電話機で実行されているかどうかを知ることができます。
https://help.sap.com/saphelp_uiaddon10/helpdata/en/32/5b8edafcfa4c9c8fbd42455a60e379/content.htm
EDIT:
ウェイ1:お使いの機種が設定されている場合は、あなたのコードでそれを使用することができます。 をComponent.jsで:
var deviceModel = new sap.ui.model.json.JSONModel({
isTouch : sap.ui.Device.support.touch,
isNoTouch : !sap.ui.Device.support.touch,
isPhone : sap.ui.Device.system.phone,
isNoPhone : !sap.ui.Device.system.phone,
listMode : sap.ui.Device.system.phone ? "None" : "SingleSelectMaster",
listItemType : sap.ui.Device.system.phone ? "Active" : "Inactive"
});
deviceModel.setDefaultBindingMode("OneWay");
this.setModel(deviceModel, "device");
以下のリンクを参照してください。 XMLで
:
<Dialog id="confirmDialog"
title="Confirm"
showHeader="true"
state="Warning"
stretch="{device>/isPhone}"
type="Standard">
ウェイ2:あなたは、常に使用することができます。sap.ui.Device.system.phone
値ヨーヨー場合別のモデルを作成したくありません。しかし、私はあなたにデバイスモデルを作成し、それを使用することをお勧めします。
<Dialog id="confirmDialog"
title="Confirm"
showHeader="true"
state="Warning"
stretch="sap.ui.Device.system.phone"
type="Standard">