question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] Background image squished.

See original GitHub issue

Platform

  • Android

Author or host

Microsoft Teams

Version of SDK

1.2.10

Details

Here is the JSON:

When a background image has fillMode: "repeat"/"repeatHorizontally"/"repeatVertically", the image is compressed. And this happens irrespective of where the background image is placed.

Here is the Desktop, Android and iOS comparison:

Desktop Android iOS
image image image
{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "Container",
            "minHeight": "150px",
            "backgroundImage": "https://adaptivecards.io/content/AlkiBeach.jpg",
            "items": [
                {
                    "type": "TextBlock",
                    "text": "What a beautiful background"
                }
            ]
        },
        {
            "type": "TextBlock",
            "text": "They can even repeat a bunch of different ways..."
        },
        {
            "type": "Container",
            "minHeight": "100px",
            "backgroundImage": {
                "url": "https://adaptivecards.io/content/uparrow.png",
                "fillMode": "Repeat"
            }
        },
        {
            "type": "Container",
            "backgroundImage": {
                "url": "https://adaptivecards.io/content/uparrow.png",
                "fillMode": "RepeatHorizontally",
                "verticalAlignment": "Center"
            }
        },
        {
            "type": "Container",
            "minHeight": "100px",
            "backgroundImage": {
                "url": "https://adaptivecards.io/content/uparrow.png",
                "fillMode": "RepeatVertically",
                "horizontalAlignment": "Center"
            }
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.2"
}

cc: @VikrantSingh01, @anbah34, @shbhadra

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
golddovecommented, Oct 22, 2020

@golddove updates? Is this still on track to be checked in by EOW?

Should be good. In PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android image squashed
But, when I try to use this image in my Android app (background activity) it is squashed. squashed image. Can anyone tell me...
Read more >
android 10 stretched lock screen wallpaper
You must go to Gallery and select Set As Wallpaper from there. Setting wallpaper any other way stretches/squashes it. Worked perfectly! Thanks. @MrShpak...
Read more >
Hi, how to fix this distorted background images? ...
It looks like it's distorting the pure black pixels, so brightening the image might fix the problem.
Read more >
Maintaining Aspect Ratio of Background Image
to Android Developers. I made a landscape and a portrait version of my background image and designed them both to look ok (not...
Read more >
Android Setting Activity background image (Right way)
I this video we will learn to use Images / drawable in the background of our activity and preventing them from squeezing or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found