Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
306 views
Welcome To Ask or Share your Answers For Others

1 Answer

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)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...