Как могло случиться, что адаптивные карты в Microsoft Teams для Android никогда не обрезались (используя c#)? - PullRequest
0 голосов
/ 19 июня 2020

В Microsoft Teams для Windows адаптивные карты выглядят следующим образом:

enter image description here

And in Microsoft Teams for Android the same Adaptive Cards look this way: enter image description here

I'm using LG-files (Microsoft Language Generation files) and Microsoft.Bot.Builder.Dialogs.

Is there a solution to prevent that adaptive cards were being cropped in Microsoft Teams for Android?

Here is the code of the first part:

{
"type": "AdaptiveCard",
"body": [
    {
        "type": "ColumnSet",
        "columns": [
            {
                "type": "Column",
                "width": "auto",
                "items": [
                    {
                        "type": "ActionSet",
                        "actions": [
                            {
                                "type": "Action.Submit",
                                "title": "Ja, einverstanden.",
                                "data": {
                                    "msteams": {
                                        "type": "messageBack",
                                        "text": "Ja, einverstanden.",
                                        "displayText": "Ja, einverstanden."
                                    }
                                }                                   
                            }
                        ]
                    }
                ]
            },
            {
                "type": "Column",
                "width": "auto",
                "items": [
                    {
                        "type": "ActionSet",
                        "actions": [
                            {
                                "type": "Action.Submit",
                                "title": "Nein",
                                "data": {
                                    "msteams": {
                                        "type": "messageBack",
                                        "text": "Nein",
                                        "displayText": "Nein"
                                    }
                                }                                   
                            }
                        ]
                    }
                ]
            },
            {
                "type": "Column",
                "width": "auto",
                "items": [
                    {
                        "type": "ActionSet",
                        "actions": [
                            {
                                "type": "Action.Submit",
                                "title": "Weitere Infos",
                                "data": {
                                    "msteams": {
                                        "type": "messageBack",
                                        "text": "Weitere Infos",
                                        "displayText": "Weitere Infos"
                                    }
                                }                                   
                            }
                        ]
                    }
                ]
            }
        ]
    }
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}

Thank you Tim Cadenbach. Your example looks like this on Android:

enter image description here

This means that only the first button was displayed and it was cropped. On Windows, it Looks like this:

введите описание изображения здесь

Первая и вторая кнопки обрезаны.

Все кнопки расположены одна над другой, а не бок о бок.

Я подумал добавить различие в регистре и программирование других адаптивных карт для мобильных устройств. Как узнать, что это за устройство? С помощью каналов из Microsoft.Bot.Connector я могу узнать, что это канал MS Teams. А как устройство?

Ответы [ 2 ]

0 голосов
/ 22 июня 2020

Обновленный ответ:

Это известная проблема в мобильном приложении MS Teams, уже поднятая с командой здесь: https://github.com/microsoft/AdaptiveCards/issues/3919

Кто-то работает над этим и она должна быть решена в следующем месяце.

0 голосов
/ 22 июня 2020

Это поведение по умолчанию для мобильных адаптивных действий карты. Адаптивная карточка отображает кнопки в соответствии с шириной экрана и предоставляет вам полосу прокрутки ниже для прокрутки кнопок.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...