Skip to content

Commit

Permalink
Fix first element changing place with background image (#3393) (#3891)
Browse files Browse the repository at this point in the history
Co-authored-by: shalinijoshi19 <[email protected]>
  • Loading branch information
almedina-ms and shalinijoshi19 committed Mar 30, 2020
1 parent ee9456d commit 1bd7a58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ HttpRequestResult<Bitmap> 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)
{
Expand All @@ -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:[<media type>][;base64],<data>
if(uriScheme.equals("data"))
if (uriScheme.equals("data"))
{
return loadDataUriImage(path);
}
Expand Down

0 comments on commit 1bd7a58

Please sign in to comment.