cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to display full screen picture in SAP MDK?

boolan79
Explorer
0 Kudos
552

Hello,

I am developing a mobile app using MDK.

I have to display several pictures from the backend.

I have managed to implement the OData interface for that.

The picture is displayed in the ImageCollection in the SectionedTable using online OData request:

"Controls": [
    {
      "Sections": [
         {
          "ImageCell": {
            "Image": "/SAPAssetManager/Services/OnlineAssetManager.service/{@odata.readLink}/$value",          
            "Title": "{@odata.readLink}"
          },
          "Layout": {
            "LayoutType": "Vertical",
            "NumberOfColumns": 1
          },  
          "Target": {
            "EntitySet": "ZPictures",
            "Service": "/SAPAssetManager/Services/OnlineAssetManager.service",
            "QueryOptions": "$filter=ZZDocNr eq '{ZZDocNr}' and ZZPicNr eq '{ZZPicNr}'"
          },        
          "_Type": "Section.Type.ImageCollection"
        }
      ],
      "LoadingIndicator": {
        "Enabled": true,
        "Text": "$(L,z_details_loading)"
      },
      "_Name": "PictureSecTab",
      "_Type": "Control.Type.SectionedTable"
    }
  ]
 
But the problem is, that the picture is very small (see attachment) and I would like to have it full screen.
How can I do it in a standard way?
Is there another component to display the picture?
Or can I somehow provide the image size?
 
Many thanks,
Chris.

Accepted Solutions (0)

Answers (2)

Answers (2)

panushjain
Product and Topic Expert
Product and Topic Expert
0 Kudos

Try using a section of type image in the control instead of a ImageCollection, sharing sample code for reference.

 

"Controls": [
    {
      "Sections": [
         {
           "_Type": "Section.Type.Image",
           "Image": "/SAPAssetManager/Services/OnlineAssetManager.service/{@odata.readLink}/$valuE",
            "Visible": true
         }
      ]
    }
]

 

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

The Image Collection is designed to show a thumbnail view of an image along with optional labels.

If you want to display an image to fill the width of the page you should consider using the Image Section which will give you options on how large the image will render.  However if you need multiple images you will need an image section per image to be displayed.