wiils
wiils

Reputation: 143

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 layout and these are the screenshots :

For Android Screen Size 4.7 UI looks like below screenshot :

enter image description here

and For Android Screen 7.0 Size UI looks like this screenshot :

enter image description here

as the images shows the circular image on screen size 7 is pretty small and edittext is too looking worst.

How can i support both or more screen sizes while keeping the view like screen size 4.7.

Upvotes: 1

Views: 1098

Answers (3)

Shahbaz Akhtar
Shahbaz Akhtar

Reputation: 333

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

Upvotes: 0

Udit
Udit

Reputation: 1037

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)

Upvotes: 2

Arbaz.in
Arbaz.in

Reputation: 1558

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

Upvotes: 1

Related Questions