简体   繁体   English

自适应卡中的项目数量是否有限制,以便它在 Android 的 Outlook Mobile 中呈现?

[英]Is there a limit on the number of items in an Adaptive Card so that it renders in Outlook Mobile for Android?

I have created an Adaptive Card using Adaptive Cards Designer .我使用Adaptive Cards Designer创建了一张 Adaptive Card。 At the top of the card are 6 buttons that when clicked toggle the visibility control for a related container eg clicking button 2 reveals container 2 by changing its visibility to true.卡片顶部有 6 个按钮,当单击它们时,它们会切换相关容器的可见性控件,例如,单击按钮 2 通过将容器 2 的可见性更改为 true 来显示容器 2。 In each container is a ChoiceSet and a button to close the container.每个容器中都有一个 ChoiceSet 和一个用于关闭容器的按钮。 Closing the container merely toggles the container visibility back to false with the effect it is hidden.关闭容器只是将容器可见性切换回 false 并具有隐藏的效果。 Submitting the card triggers a Microsoft Flow to return a new payload to the card.提交卡片会触发 Microsoft Flow 将新的有效负载返回到卡片。

The card works fine in the Designer, Outlook for Desktop (Windows 10) and Outlook Web (Edge-Cr Dev, Edge and Chrome).该卡在 Designer 中运行良好,Outlook 用于桌面(Windows 10)和 Outlook Web(Edge-Cr 开发、Edge 和 Chrome)。 The card works fine in Dark and Light mode in Outlook for Desktop and Outlook Web.该卡在桌面的 Outlook 和 Outlook Web 的深色和浅色模式下工作正常。

My issue is that the card renders as empty in Outlook for Mobile (Android).我的问题是该卡在 Outlook for Mobile (Android) 中呈现为空。 Sample cards render fine in Outlook for Mobile.示例卡在 Outlook for Mobile 中呈现良好。 This is making me think that there is limit to the card complexity / number of items that can be rendered on mobile.这让我觉得卡的复杂性/可以在移动设备上呈现的项目数量是有限的。

Is there a limit on the complexity / number of items for mobile?移动设备的复杂性/项目数量是否有限制?

Screenshots and code provided below:下面提供的屏幕截图和代码:

Adaptive Card with 6 buttons带 6 个按钮的自适应卡

Adaptive Card with one of the containers visible具有可见容器之一的自适应卡片

Adaptive Card rendering as blank in Outlook Mobile Outlook Mobile 中的自适应卡片呈现为空白

{
"type": "AdaptiveCard",
"version": "1.0",
"hideOriginalBody": true,
"body": [
    {
        "type": "TextBlock",
        "weight": "Bolder",
        "color": "Accent",
        "text": "How are you feeling today?",
        "wrap": true
    },
    {
        "type": "ActionSet",
        "actions": [
            {
                "type": "Action.ToggleVisibility",
                "title": "Mad",
                "targetElements": [
                    "madCont"
                ]
            },
            {
                "type": "Action.ToggleVisibility",
                "title": "Scared",
                "targetElements": [
                    "scaredCont"
                ]
            }
        ]
    },
    {
        "type": "ActionSet",
        "actions": [
            {
                "type": "Action.ToggleVisibility",
                "title": "Powerful",
                "targetElements": [
                    "powerfulCont"
                ]
            },
            {
                "type": "Action.ToggleVisibility",
                "title": "Joyful",
                "targetElements": [
                    "joyfulCont"
                ]
            }
        ]
    },
    {
        "type": "ActionSet",
        "actions": [
            {
                "type": "Action.ToggleVisibility",
                "title": "Sad",
                "targetElements": [
                    "sadCont"
                ]
            },
            {
                "type": "Action.ToggleVisibility",
                "title": "Peaceful",
                "targetElements": [
                    "peacefulCont"
                ]
            }
        ]
    },
    {
        "type": "Container",
        "id": "madCont",
        "isVisible": false,
        "style": "emphasis",
        "items": [
            {
                "type": "TextBlock",
                "text": "Feeling mad...",
                "wrap": true
            },
            {
                "type": "TextBlock",
                "spacing": "None",
                "weight": "Lighter",
                "text": "Which terms best express your feelings?",
                "wrap": true
            },
            {
                "type": "Input.ChoiceSet",
                "id": "madChoice",
                "separator": true,
                "placeholder": "Which terms best express your feelings?",
                "choices": [
                    {
                        "title": "Hurt",
                        "value": "m1"
                    },
                    {
                        "title": "Hostile",
                        "value": "m2"
                    },
                    {
                        "title": "Angry",
                        "value": "m3"
                    },
                    {
                        "title": "Selfish",
                        "value": "m4"
                    },
                    {
                        "title": "Hateful",
                        "value": "m5"
                    },
                    {
                        "title": "Critical",
                        "value": "m6"
                    },
                    {
                        "title": "Distant",
                        "value": "m7"
                    },
                    {
                        "title": "Sarcastic",
                        "value": "m8"
                    },
                    {
                        "title": "Frustrated",
                        "value": "m9"
                    },
                    {
                        "title": "Jealous",
                        "value": "m10"
                    },
                    {
                        "title": "Irritated",
                        "value": "m11"
                    },
                    {
                        "title": "Skeptical",
                        "value": "m12"
                    }
                ],
                "style": "expanded",
                "isMultiSelect": true
            },
            {
                "type": "ActionSet",
                "actions": [
                    {
                        "type": "Action.ToggleVisibility",
                        "title": "Close section",
                        "targetElements": [
                            "madCont"
                        ]
                    }
                ]
            }
        ]
    },
    {
        "type": "Container",
        "id": "scaredCont",
        "isVisible": false,
        "style": "emphasis",
        "items": [
            {
                "type": "TextBlock",
                "text": "Feeling scared...",
                "wrap": true
            },
            {
                "type": "TextBlock",
                "spacing": "None",
                "weight": "Lighter",
                "text": "Which terms best express your feelings?",
                "wrap": true
            },
            {
                "type": "Input.ChoiceSet",
                "id": "scaredChoice",
                "separator": true,
                "placeholder": "Which terms best express your feelings?",
                "choices": [
                    {
                        "title": "Confused",
                        "value": "s1"
                    },
                    {
                        "title": "Rejected",
                        "value": "s2"
                    },
                    {
                        "title": "Helpless",
                        "value": "s3"
                    },
                    {
                        "title": "Submissive",
                        "value": "s4"
                    },
                    {
                        "title": "Insecure",
                        "value": "s5"
                    },
                    {
                        "title": "Anxious",
                        "value": "s6"
                    },
                    {
                        "title": "Bewildered",
                        "value": "s7"
                    },
                    {
                        "title": "Discouraged",
                        "value": "s8"
                    },
                    {
                        "title": "Insignificant",
                        "value": "s9"
                    },
                    {
                        "title": "Inadequate",
                        "value": "s10"
                    },
                    {
                        "title": "Embarrassed",
                        "value": "s11"
                    },
                    {
                        "title": "Overwhelmed",
                        "value": "s12"
                    }
                ],
                "style": "expanded",
                "isMultiSelect": true
            },
            {
                "type": "ActionSet",
                "actions": [
                    {
                        "type": "Action.ToggleVisibility",
                        "title": "Close section",
                        "targetElements": [
                            "scaredCont"
                        ]
                    }
                ]
            }
        ]
    },
    {
        "type": "Container",
        "id": "joyfulCont",
        "isVisible": false,
        "style": "emphasis",
        "items": [
            {
                "type": "TextBlock",
                "text": "Feeling joyful...",
                "wrap": true
            },
            {
                "type": "TextBlock",
                "spacing": "None",
                "weight": "Lighter",
                "text": "Which terms best express your feelings?",
                "wrap": true
            },
            {
                "type": "Input.ChoiceSet",
                "id": "joyChoice",
                "separator": true,
                "placeholder": "Which terms best express your feelings?",
                "choices": [
                    {
                        "title": "Excited",
                        "value": "j1"
                    },
                    {
                        "title": "Sensuous",
                        "value": "j2"
                    },
                    {
                        "title": "Energetic",
                        "value": "j3"
                    },
                    {
                        "title": "Cheerful",
                        "value": "j4"
                    },
                    {
                        "title": "Creative",
                        "value": "j5"
                    },
                    {
                        "title": "Hopeful",
                        "value": "j6"
                    },
                    {
                        "title": "Daring",
                        "value": "j7"
                    },
                    {
                        "title": "Fascinating",
                        "value": "j8"
                    },
                    {
                        "title": "Stimulating",
                        "value": "j9"
                    },
                    {
                        "title": "Amused",
                        "value": "j10"
                    },
                    {
                        "title": "Playful",
                        "value": "j11"
                    },
                    {
                        "title": "Optimistic",
                        "value": "j12"
                    }
                ],
                "style": "expanded",
                "isMultiSelect": true
            },
            {
                "type": "ActionSet",
                "actions": [
                    {
                        "type": "Action.ToggleVisibility",
                        "title": "Close section",
                        "targetElements": [
                            "joyfulCont"
                        ]
                    }
                ]
            }
        ]
    },
    {
        "type": "Container",
        "id": "powerfulCont",
        "isVisible": false,
        "style": "emphasis",
        "items": [
            {
                "type": "TextBlock",
                "text": "Feeling powerful...",
                "wrap": true
            },
            {
                "type": "TextBlock",
                "spacing": "None",
                "weight": "Lighter",
                "text": "Which terms best express your feelings?",
                "wrap": true
            },
            {
                "type": "Input.ChoiceSet",
                "id": "powerfulChoice",
                "separator": true,
                "placeholder": "Which terms best express your feelings?",
                "choices": [
                    {
                        "title": "Faithful",
                        "value": "p1"
                    },
                    {
                        "title": "Important",
                        "value": "p2"
                    },
                    {
                        "title": "Appreciated",
                        "value": "p3"
                    },
                    {
                        "title": "Respected",
                        "value": "p4"
                    },
                    {
                        "title": "Proud",
                        "value": "p5"
                    },
                    {
                        "title": "Aware",
                        "value": "p6"
                    },
                    {
                        "title": "Confident",
                        "value": "p7"
                    },
                    {
                        "title": "Discerning",
                        "value": "p8"
                    },
                    {
                        "title": "Valueable",
                        "value": "p9"
                    },
                    {
                        "title": "Worthwhile",
                        "value": "p10"
                    },
                    {
                        "title": "Successful",
                        "value": "p11"
                    },
                    {
                        "title": "Suprised",
                        "value": "p12"
                    }
                ],
                "style": "expanded",
                "isMultiSelect": true
            },
            {
                "type": "ActionSet",
                "actions": [
                    {
                        "type": "Action.ToggleVisibility",
                        "title": "Close section",
                        "targetElements": [
                            "powerfulCont"
                        ]
                    }
                ]
            }
        ]
    },
    {
        "type": "Container",
        "id": "peacefulCont",
        "isVisible": false,
        "style": "emphasis",
        "items": [
            {
                "type": "TextBlock",
                "text": "Feeling peaceful...",
                "wrap": true
            },
            {
                "type": "TextBlock",
                "spacing": "None",
                "weight": "Lighter",
                "text": "Which terms best express your feelings?",
                "wrap": true
            },
            {
                "type": "Input.ChoiceSet",
                "id": "peacefulChoice",
                "separator": true,
                "placeholder": "Which terms best express your feelings?",
                "choices": [
                    {
                        "title": "Content",
                        "value": "q1"
                    },
                    {
                        "title": "Thoughful",
                        "value": "q2"
                    },
                    {
                        "title": "Intimate",
                        "value": "q3"
                    },
                    {
                        "title": "Loving",
                        "value": "q4"
                    },
                    {
                        "title": "Trusting",
                        "value": "q5"
                    },
                    {
                        "title": "Nurturing",
                        "value": "q6"
                    },
                    {
                        "title": "Relaxed",
                        "value": "q7"
                    },
                    {
                        "title": "Pensive",
                        "value": "q8"
                    },
                    {
                        "title": "Responsive",
                        "value": "q9"
                    },
                    {
                        "title": "Serene",
                        "value": "q10"
                    },
                    {
                        "title": "Secure",
                        "value": "q11"
                    },
                    {
                        "title": "Thankful",
                        "value": "q12"
                    }
                ],
                "style": "expanded",
                "isMultiSelect": true
            },
            {
                "type": "ActionSet",
                "actions": [
                    {
                        "type": "Action.ToggleVisibility",
                        "title": "Close section",
                        "targetElements": [
                            "peacefulCont"
                        ]
                    }
                ]
            }
        ]
    },
    {
        "type": "Container",
        "id": "sadCont",
        "isVisible": false,
        "style": "emphasis",
        "items": [
            {
                "type": "TextBlock",
                "text": "Feeling sad...",
                "wrap": true
            },
            {
                "type": "TextBlock",
                "spacing": "None",
                "weight": "Lighter",
                "text": "Which terms best express your feelings?",
                "wrap": true
            },
            {
                "type": "Input.ChoiceSet",
                "id": "sadChoice",
                "separator": true,
                "placeholder": "Which terms best express your feelings?",
                "choices": [
                    {
                        "title": "Tired",
                        "value": "t1"
                    },
                    {
                        "title": "Bored",
                        "value": "t2"
                    },
                    {
                        "title": "Lonely",
                        "value": "t3"
                    },
                    {
                        "title": "Depressed",
                        "value": "t4"
                    },
                    {
                        "title": "Ashamed",
                        "value": "t5"
                    },
                    {
                        "title": "Guilty",
                        "value": "t6"
                    },
                    {
                        "title": "Sleepy",
                        "value": "t7"
                    },
                    {
                        "title": "Apathetic",
                        "value": "t8"
                    },
                    {
                        "title": "Isolated",
                        "value": "t9"
                    },
                    {
                        "title": "Inferior",
                        "value": "t10"
                    },
                    {
                        "title": "Stupid",
                        "value": "t11"
                    },
                    {
                        "title": "Remorseful",
                        "value": "t12"
                    }
                ],
                "style": "expanded",
                "isMultiSelect": true
            },
            {
                "type": "ActionSet",
                "actions": [
                    {
                        "type": "Action.ToggleVisibility",
                        "title": "Close section",
                        "targetElements": [
                            "sadCont"
                        ]
                    }
                ]
            }
        ]
    },
    {
        "type": "TextBlock",
        "text": "Feel free to provide additional context to your feelings",
        "wrap": true
    },
    {
        "type": "Container",
        "items": [
            {
                "type": "Input.Text",
                "id": "feedback",
                "placeholder": "Do not include feedback that may identify you unless your are comfortable to do so",
                "isMultiline": true
            },
            {
                "type": "TextBlock",
                "text": "*All submissions are anonymous*",
                "wrap": true
            },
            {
                "type": "ActionSet",
                "actions": [
                    {
                        "type": "Action.Http",
                        "id": "submitHealth",
                        "title": "Submit",
                        "method": "POST",
                        "url": "https://prod-121.westeurope.logic.azure.com:443/workflows/4094594b2712463cbb9d98d349e70733/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=5adh7-2ufbHBLFMLGdKR7_OYuQECIX2B66pN_ihICig",
                        "body": "[{'mad': '{{madChoice.value}}'},{'scared': '{{scaredChoice.value}}'},{'joyful': '{{joyChoice.value}}'},{'powerful': '{{powerfulChoice.value}}'},{'peaceful': '{{peacefulChoice.value}}'},{'sad': '{{sadChoice.value}}'},{'feedback': '{{feedback.value}}'}]",
                        "headers": [
                            {
                                "name": "Authorization",
                                "value": ""
                            }
                        ]
                    }
                ]
            }
        ]
    }
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"originator": "<<<removed for stack overflow post>>>",
"fallbackText": "Sorry your email application does not support Adaptive Cards."

} }

there's no limit in complexity as such but some hosts (like MS Teams) do have a limit in card size based on kb.复杂性没有限制,但一些主机(如 MS Teams)确实有基于 kb 的卡大小限制。 Think MS Teams allows max 25 kb. Think MS Teams 最多允许 25 kb。 Just try to build a really complex card, it will tell you if it's too large.试着制作一张非常复杂的卡片,它会告诉你它是否太大。

In addition, as far as I know, there's a bug in Outlook Mobile not rendering cards correctly atm so your issue might be related.此外,据我所知,Outlook Mobile 中存在一个错误,无法正确呈现卡 atm,因此您的问题可能与此有关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在适用于 iOS 和 Android 的 Outlook Mobile 应用程序中启用显示从 Microsoft Flow 发送的自定义自适应卡片? - How to enable showing a custom adaptive card sent from Microsoft Flow in Outlook Mobile app for iOS and Android? 自适应卡未在 Teams 移动应用上呈现 - Adaptive card is not rendered on Teams mobile app 限制Android中可见上下文菜单项的数量 - Limit number of visible context menu items in Android Android ListView - 限制一次显示的项目数 - Android ListView - limit number of items displayed at a time 限制ListView中的项目数 - Limit number of Items in ListView 带有正方形项目的GridView在android中具有自适应的宽度/高度 - GridView with square items in android with adaptive width/height Android Spinner Control:限制下拉菜单中可见的项目数 - Android Spinner Control : Limit the Number of Items Visible in Dropdown eclipse android gui designer-限制列表中的项目数 - eclipse android gui designer - limit number of items in list Microsoft Teams Android 应用程序中的自适应卡片文本溢出 - Adaptive Card text overflow in Microsoft Teams Android app SD 卡上的目录中的文件数是否有限制? - Is there a limit for the number of files in a directory on an SD card?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM