Skip to content Skip to sidebar Skip to footer

Creating Same Ui Supporting Different Screen Sizes?

I am Currently having designing problems in android studio. I want to create UI which should looks same on every device but now i can't do that properly. i am using constraint layo

Solution 1:

Adaptive constraints can be used to achieve this.

For example, instead of putting an image view of say 100 * 100 dp, you can use specify the width in percentage of the screen size.

ConstraintLayout comes with many tools to help you with such as barriers, percentageWidth, chains etc.

A nice blog to get you started on the same : https://proandroiddev.com/getting-your-constraints-right-constraintlayout-786254ed1166

(I am the author of the blog)

Solution 2:

Use SDP - a scalable size unit library for supporting different screens.

An android SDK that provides a new size unit - sdp (scalable dp). This size unit scales with the screen size. It can help Android developers with supporting multiple screens. Here is the LINK

Solution 3:

To Support different screen sizes. Use ConstraintLayout. Google has solved the biggest problem for Android developers called Support different screen sizes by ConstraintLayout.

https://developer.android.com/training/multiscreen/screensizes

Post a Comment for "Creating Same Ui Supporting Different Screen Sizes?"