I have test my app once in my tablet but when i another time i tested it in my mobile i saw there was a huge difference in the icons/buttons size after a few internet search i got to know that it is bcz i am using pixel and the pixel component in kodular is normal pixel not Device independent pixel so i need to use percent instead of pixel in order for my images/buttons and also cardview to display correctly but i cannot give a decimal number in percentage so
what is the solution to it??
You have already given yourself the solution, using percentage
#HappyKoding
No.
Sometimes it works with pixels and sometimes it works with percentage.
You can use some maths and conditions to adjust sizes.
Like if screen witdth is x then component width will be y.
2 Likes
no it is not happening the way i want bcz it doesnβt support decimal numbers
Well, everything varies depending on the device screen
So better is to use screen width and height to resize components.