Reputation: 143
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 :
and For Android Screen 7.0 Size UI looks like this screenshot :
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
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
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