Skip to content

Commit 1bd7a58

Browse files
almedina-msshalinijoshi19
andauthored
Fix first element changing place with background image (#3393) (#3891)
Co-authored-by: shalinijoshi19 <shalinij@microsoft.com>
1 parent ee9456d commit 1bd7a58

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

source/android/adaptivecards/src/main/java/io/adaptivecards/renderer/BackgroundImageLoaderAsync.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ void onSuccessfulPostExecute(Bitmap bitmap)
4646
{
4747
BitmapDrawable background = new BackgroundImageDrawable(m_context.getResources(), bitmap, m_backgroundImageProperties);
4848
m_layout.setBackground(background);
49-
m_layout.bringChildToFront(m_layout.getChildAt(0));
5049
}
5150

5251
private class BackgroundImageDrawable extends BitmapDrawable

source/android/adaptivecards/src/main/java/io/adaptivecards/renderer/GenericImageLoaderAsync.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ HttpRequestResult<Bitmap> loadImage(String path, Context context)
7777
String uriScheme = getUriScheme(path);
7878
IResourceResolver resourceResolver = CardRendererRegistration.getInstance().getResourceResolver(uriScheme);
7979

80-
if(resourceResolver != null)
80+
if (resourceResolver != null)
8181
{
8282
if (m_maxWidth != -1)
8383
{
@@ -96,7 +96,7 @@ else if (path.startsWith("content:"))
9696
//Step 2: If resource resolver doesn't exist, then try with treating it as a dataUri
9797
// Let's try to see if we got the image in the card as a base64 encoded string
9898
// The syntax of data URIs as in RFX 2397 is data:[<media type>][;base64],<data>
99-
if(uriScheme.equals("data"))
99+
if (uriScheme.equals("data"))
100100
{
101101
return loadDataUriImage(path);
102102
}

0 commit comments

Comments
 (0)