Skip to content

Commit

Permalink
[Android] Show all ActionSet's in column (#4181)
Browse files Browse the repository at this point in the history
* Adjust ActionSet container height to fit contents

* Add test card
  • Loading branch information
golddove authored Jun 19, 2020
1 parent a3fab36 commit 8979389
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 1 deletion.
71 changes: 71 additions & 0 deletions samples/v1.2/Tests/MultipleActionSets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "ActionSet",
"height": "stretch",
"actions": [
{
"type": "Action.ShowCard",
"title": "ShowCard1",
"card": {
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "Card1"
}
]
}
}
]
},
{
"type": "ActionSet",
"height": "stretch",
"actions": [
{
"type": "Action.ShowCard",
"title": "ShowCard2",
"card": {
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "Card2"
}
]
}
}
]
},
{
"type": "TextBlock",
"text": "A lil bit of text!"
}
],
"width": "stretch"
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"wrap": true
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ else if ((actionSet = ActionSet.dynamic_cast(baseCardElement)) == null)

// This layout contains the space for the actions (top, first element) and the hidden cards (bottom, second element)
LinearLayout rootLayout = new LinearLayout(context);
rootLayout.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
rootLayout.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
rootLayout.setOrientation(LinearLayout.VERTICAL);
rootLayout.setFocusable(true);
rootLayout.setFocusableInTouchMode(true);
Expand Down

0 comments on commit 8979389

Please sign in to comment.