forked from microsoft/AdaptiveCards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Shared][Android] Background image spec updates (microsoft#2868)
* Fix build errors * Add swig generated files for android * Add support for vertial and horizontal cover in Android * Fix json payload * Add missing test file * Fix behaviour for background image rendering * Jwoo/ios background image changes (microsoft#2920) * fixes unit test on shared model * dev complete * [UWP] Renames from Background Image spec updates (microsoft#2928)
- Loading branch information
1 parent
cb18881
commit 60c74d2
Showing
108 changed files
with
650 additions
and
168 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
57 changes: 57 additions & 0 deletions
57
samples/v1.2/Elements/AdaptiveCard.BackgroundImage.FillMode.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,57 @@ | ||
{ | ||
"$schema": "http:https://adaptivecards.io/schemas/adaptive-card.json", | ||
"type": "AdaptiveCard", | ||
"version": "1.2", | ||
"backgroundImage": { | ||
"url": "https://picsum.photos/60/60?image=101", | ||
"fillMode": "repeat" | ||
}, | ||
"body": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text in body" | ||
}, | ||
{ | ||
"type": "ColumnSet", | ||
"columns": [ | ||
{ | ||
"type": "Column", | ||
"width": "auto", | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text in Column 1" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "Column", | ||
"width": "auto", | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text in Column 2" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "Container", | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text 1 in Container" | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text 2 in Container" | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text 3 in Container" | ||
} | ||
] | ||
} | ||
] | ||
} |
58 changes: 58 additions & 0 deletions
58
samples/v1.2/Elements/AdaptiveCard.BackgroundImage.FillVerticalAlignment.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,58 @@ | ||
{ | ||
"$schema": "http:https://adaptivecards.io/schemas/adaptive-card.json", | ||
"type": "AdaptiveCard", | ||
"version": "1.2", | ||
"backgroundImage": { | ||
"url": "https://picsum.photos/60/60?image=101", | ||
"fillMode": "repeatHorizontally", | ||
"verticalAlignment": "center" | ||
}, | ||
"body": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text in body" | ||
}, | ||
{ | ||
"type": "ColumnSet", | ||
"columns": [ | ||
{ | ||
"type": "Column", | ||
"width": "auto", | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text in Column 1" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "Column", | ||
"width": "auto", | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text in Column 2" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "Container", | ||
"items": [ | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text 1 in Container" | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text 2 in Container" | ||
}, | ||
{ | ||
"type": "TextBlock", | ||
"text": "Text 3 in Container" | ||
} | ||
] | ||
} | ||
] | ||
} |
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
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
54 changes: 54 additions & 0 deletions
54
source/android/adaptivecards/src/main/java/io/adaptivecards/objectmodel/ImageFillMode.java
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,54 @@ | ||
/* ---------------------------------------------------------------------------- | ||
* This file was automatically generated by SWIG (http:https://www.swig.org). | ||
* Version 4.0.0 | ||
* | ||
* Do not make changes to this file unless you know what you are doing--modify | ||
* the SWIG interface file instead. | ||
* ----------------------------------------------------------------------------- */ | ||
|
||
package io.adaptivecards.objectmodel; | ||
|
||
public enum ImageFillMode { | ||
Cover(0), | ||
RepeatHorizontally, | ||
RepeatVertically, | ||
Repeat; | ||
|
||
public final int swigValue() { | ||
return swigValue; | ||
} | ||
|
||
public static ImageFillMode swigToEnum(int swigValue) { | ||
ImageFillMode[] swigValues = ImageFillMode.class.getEnumConstants(); | ||
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) | ||
return swigValues[swigValue]; | ||
for (ImageFillMode swigEnum : swigValues) | ||
if (swigEnum.swigValue == swigValue) | ||
return swigEnum; | ||
throw new IllegalArgumentException("No enum " + ImageFillMode.class + " with value " + swigValue); | ||
} | ||
|
||
@SuppressWarnings("unused") | ||
private ImageFillMode() { | ||
this.swigValue = SwigNext.next++; | ||
} | ||
|
||
@SuppressWarnings("unused") | ||
private ImageFillMode(int swigValue) { | ||
this.swigValue = swigValue; | ||
SwigNext.next = swigValue+1; | ||
} | ||
|
||
@SuppressWarnings("unused") | ||
private ImageFillMode(ImageFillMode swigEnum) { | ||
this.swigValue = swigEnum.swigValue; | ||
SwigNext.next = this.swigValue+1; | ||
} | ||
|
||
private final int swigValue; | ||
|
||
private static class SwigNext { | ||
private static int next = 0; | ||
} | ||
} | ||
|
Oops, something went wrong.