forked from microsoft/AdaptiveCards
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ability to scroll when there are more buttons than viewing area (…
…microsoft#1581) * make rendering to be synchronous by default * updated custom textblock renderer * optimized use of html rendering * fixed factset issue * fixed build compatability issues below iOS 11.3 * fixes before CR * added UIScrollView to ActionSet * edits before CR * Added sample json and updates b4 CR
- Loading branch information
Showing
12 changed files
with
204 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
source/ios/AdaptiveCards/ADCIOSVisualizer/resources/Action.Scrolling.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json", | ||
"type": "AdaptiveCard", | ||
"version": "1.0", | ||
"body": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "This cards shows that action set will have scroll bar when it has more buttons than it can show", | ||
"wrap": true | ||
} | ||
], | ||
"actions": [ | ||
{ | ||
"type": "Action.OpenUrl", | ||
"title": "button 1", | ||
"url": "http://adaptivecards.io" | ||
}, | ||
{ | ||
"type": "Action.OpenUrl", | ||
"title": "button 2", | ||
"url": "http://adaptivecards.io" | ||
}, | ||
{ | ||
"type": "Action.OpenUrl", | ||
"title": "button 3", | ||
"url": "http://adaptivecards.io" | ||
}, | ||
{ | ||
"type": "Action.OpenUrl", | ||
"title": "button 4", | ||
"url": "http://adaptivecards.io" | ||
}, | ||
{ | ||
"type": "Action.OpenUrl", | ||
"title": "button 5", | ||
"url": "http://adaptivecards.io" | ||
}, | ||
{ | ||
"type": "Action.OpenUrl", | ||
"title": "button 6", | ||
"url": "http://adaptivecards.io" | ||
}, | ||
{ | ||
"type": "Action.OpenUrl", | ||
"title": "button 7", | ||
"url": "http://adaptivecards.io" | ||
}, | ||
{ | ||
"type": "Action.OpenUrl", | ||
"title": "button 8", | ||
"url": "http://adaptivecards.io" | ||
}, | ||
{ | ||
"type": "Action.OpenUrl", | ||
"title": "button 9", | ||
"url": "http://adaptivecards.io" | ||
}, | ||
{ | ||
"type": "Action.OpenUrl", | ||
"title": "button 10", | ||
"url": "http://adaptivecards.io" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
source/ios/AdaptiveCards/AdaptiveCards/AdaptiveCards/ACRContentHoldingUIScrollView.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// | ||
// ACRContentHoldingUIScrollView | ||
// ACRContentHoldingUIScrollView.h | ||
// | ||
// Copyright © 2018 Microsoft. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface ACRContentHoldingUIScrollView: UIScrollView | ||
|
||
@end |
17 changes: 17 additions & 0 deletions
17
source/ios/AdaptiveCards/AdaptiveCards/AdaptiveCards/ACRContentHoldingUIScrollView.mm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// ACRContentHoldingUIScrollView | ||
// ACRContentHoldingUIScrollView.mm | ||
// | ||
// Copyright © 2018 Microsoft. All rights reserved. | ||
// | ||
|
||
#import "ACRContentHoldingUIScrollView.h" | ||
|
||
@implementation ACRContentHoldingUIScrollView | ||
|
||
- (CGSize)intrinsicContentSize | ||
{ | ||
return self.frame.size; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.