From 5496a9624f403e3af95a0091092ab695265b8339 Mon Sep 17 00:00:00 2001 From: Alberto Medina Gutierrez Date: Mon, 26 Aug 2019 16:03:25 -0700 Subject: [PATCH] Fix first element changing place with background image --- .../io/adaptivecards/renderer/BackgroundImageLoaderAsync.java | 1 - .../io/adaptivecards/renderer/GenericImageLoaderAsync.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/android/adaptivecards/src/main/java/io/adaptivecards/renderer/BackgroundImageLoaderAsync.java b/source/android/adaptivecards/src/main/java/io/adaptivecards/renderer/BackgroundImageLoaderAsync.java index 879646b58b..94a0cc84f2 100644 --- a/source/android/adaptivecards/src/main/java/io/adaptivecards/renderer/BackgroundImageLoaderAsync.java +++ b/source/android/adaptivecards/src/main/java/io/adaptivecards/renderer/BackgroundImageLoaderAsync.java @@ -46,7 +46,6 @@ void onSuccessfulPostExecute(Bitmap bitmap) { BitmapDrawable background = new BackgroundImageDrawable(m_context.getResources(), bitmap, m_backgroundImageProperties); m_layout.setBackground(background); - m_layout.bringChildToFront(m_layout.getChildAt(0)); } private class BackgroundImageDrawable extends BitmapDrawable diff --git a/source/android/adaptivecards/src/main/java/io/adaptivecards/renderer/GenericImageLoaderAsync.java b/source/android/adaptivecards/src/main/java/io/adaptivecards/renderer/GenericImageLoaderAsync.java index 8c90ee72e5..8fe2c6628f 100644 --- a/source/android/adaptivecards/src/main/java/io/adaptivecards/renderer/GenericImageLoaderAsync.java +++ b/source/android/adaptivecards/src/main/java/io/adaptivecards/renderer/GenericImageLoaderAsync.java @@ -77,7 +77,7 @@ HttpRequestResult loadImage(String path, Context context) String uriScheme = getUriScheme(path); IResourceResolver resourceResolver = CardRendererRegistration.getInstance().getResourceResolver(uriScheme); - if(resourceResolver != null) + if (resourceResolver != null) { if (m_maxWidth != -1) { @@ -96,7 +96,7 @@ else if (path.startsWith("content:")) //Step 2: If resource resolver doesn't exist, then try with treating it as a dataUri // Let's try to see if we got the image in the card as a base64 encoded string // The syntax of data URIs as in RFX 2397 is data:[][;base64], - if(uriScheme.equals("data")) + if (uriScheme.equals("data")) { return loadDataUriImage(path); }