UI is displayed differently on different devices (so much, that is not acceptable)

Hello guys…
It’s a button inside a card view …
Can someone explain to me why the spaces between them look so different on different devices … I already tried “decoration” and it doesn’t work.
For more data, each row is inside a horizontal arrangement with… width: fill parent / Height: automatic

Cardview width: fill parent / Height: 100px
Button: width: fill parent / Height: fill parent

They have a space between CV of 3px …

This way they are displayed on “old” devices
J7-2016 (android 6.0.1) and LG G2 mini (android 5.02)


This is shown on a Galaxy J4 (android 9)

thank you for your advices!!

1 Like

Screen size difference :sweat_smile: You can Add some logic in Your app there already many Discussion is going on related to this topic.

Try this

1 Like

Instead of using pixels use percentage

First of all … Thanks for your answers, guys. @Soham_Shah @themaayur @VSatish

I did not explain well … I do not think it is a matter of sizes …

By default, if on a responsive red screen (to see the effect) we would put:

2 cardviews (width: 100% / Height: 100%), we would get 2 huge squares. One above and one below …

On android 6 and earlier devices, the cardviews would look together … and fill 100% at the sides and in height (it is logical)

Well … in android 9 cardviews do not touch each other even if they are 100% … also, they do not reach the edge

More data:
all paddings are at 0
I didn’t put spaces between the CVs
Maybe I could make some fixes with negative margin blocks to make it look better on newer devices, but I’m afraid they might overlap on old ones …

2 Likes

There are some issue in old devices with card view and you can change margin to reduce space between cardviews using decoration component.

1 Like

Yeah You are Correct as @themaayur said There are Some Issue With Cardview in Older Device even i tried once in Android KitKat And It was Disappointing but Although its a Simple rule Things Change according to the Condition or Say Time.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.