Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix first element changing place with background image #3393

Merged
merged 10 commits into from
Aug 29, 2019
Merged
Next Next commit
Fix first element changing place with background image
  • Loading branch information
almedina-ms committed Aug 26, 2019
commit 5496a9624f403e3af95a0091092ab695265b8339
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