# Add Device Models name

**URL:** <https://forum.defold.com/t/add-device-models-name/34397>\
**Category:** Questions\
**Created:** [November 10, 2018, 12:44am UTC](https://forum.defold.com/t/add-device-models-name/34397 "2018-11-10T00:44:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kouba06](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/kouba06/32/22245_2.png) [@kouba06](https://forum.defold.com/u/kouba06)\
**Post date:** [November 10, 2018, 12:44am UTC](https://forum.defold.com/t/add-device-models-name/34397/1 "2018-11-10T00:44:07Z")

</div>

i want to creat screen size for ios and android  
Do you have to add in layout all the name of Device Models “iPhone10,3”, “iPhone10,6”  
But if I did not add some devices like samsung s6, What if you enter from that device"samsung s6" what will take any size.  
Will it take the default size  
And where I will find all the devices size for Android

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [November 10, 2018, 7:48am UTC](https://forum.defold.com/t/add-device-models-name/34397/2 "2018-11-10T07:48:39Z")

</div>

Do you want to design a layout that works for a certain aspect ratio or for specific device models, such as those with a notch?

In general gui scenes will scale and reposition nodes so that the gui works well regardless of aspect ratio or screen dimensions. As for game objects with sprites, particle effects and so on you can control how those are rendered in the render script (stretch, scale to fit, zoom etc).

---

<div class="post-metadata">

**Author:** ![kouba06](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/kouba06/32/22245_2.png) [@kouba06](https://forum.defold.com/u/kouba06)\
**Post date:** [November 10, 2018, 9:44am UTC](https://forum.defold.com/t/add-device-models-name/34397/3 "2018-11-10T09:44:26Z")

</div>

> for specific device models

What is the best way to fit with all device models,  
do you need to creat display profile, Each size is different.  
Exp:  
640_960  
750_1334  
1242_2208  
1125_2436  
1242\*2688

720_1280  
1080_1920  
1440_296  
1440_2560

I will use just “Portrait”  
n fact I do not know how to deal with a different size screen.  
What are the best ways to do this?

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [November 10, 2018, 1:16pm UTC](https://forum.defold.com/t/add-device-models-name/34397/4 "2018-11-10T13:16:43Z")

</div>

> [@kouba06](#):
>
> I do not know how to deal with a different size screen.  
> What are the best ways to do this?

I’ll repeat my answer from above:

> [@britzl](#):
>
> In general gui scenes will scale and reposition nodes so that the gui works well regardless of aspect ratio or screen dimensions. As for game objects with sprites, particle effects and so on you can control how those are rendered in the render script (stretch, scale to fit, zoom etc).

You should not really have to care about it for gui scenes at least. The gui should scale and align components properly.

What kind of UI and game are you trying to create?

---

<div class="post-metadata">

**Author:** ![approbo.games](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/approbo.games/32/14162_2.png) [@approbo.games](https://forum.defold.com/u/approbo.games)\
**Post date:** [November 10, 2018, 1:41pm UTC](https://forum.defold.com/t/add-device-models-name/34397/5 "2018-11-10T13:41:36Z")

</div>

> [@kouba06](#):
>
> I will use just “Portrait”  
> n fact I do not know how to deal with a different size screen.  
> What are the best ways to do this?

This is a really difficult question to answer this without an example. You might want your non GUI content to scale to width, height or both depending on your project.

Using one of the camera scripts helped me a lot, they take a lot of legwork out of this.

Rendercam:  
[https://www.defold.com/community/projects/84064/](https://www.defold.com/community/projects/84064/)

Orthographic camera:  
[https://www.defold.com/community/projects/76573/](https://www.defold.com/community/projects/76573/)

The rendercam page has some nice example screenshots on different ways of handling scale modes for different screen sizes.

Also if your target is mobile, don’t concentrate on specific resolutions - there’s just too many. Your project should fit any resolution from 320x240 (iPhone 1) to 2688x1242 (iPhone Xs Max) and everything inbetween to to be safe.

This is something you have to just try and come back when you’re stuck.

---

<div class="post-metadata">

**Author:** ![kouba06](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/kouba06/32/22245_2.png) [@kouba06](https://forum.defold.com/u/kouba06)\
**Post date:** [November 10, 2018, 2:57pm UTC](https://forum.defold.com/t/add-device-models-name/34397/6 "2018-11-10T14:57:19Z")

</div>

> [@britzl](#):
>
> What kind of UI and game are you trying to create?

**Crossword puzzle**

We need window fits screen. Display resolution in our project settings - 640x960. But other devices have different screen resolutions, so we need correct size

 ![1541864955770](https://forum-defold-uploads.b-cdn.net/original/2X/0/01032c3e6832252e5a5a2079aac1df362defedde.png)  
I use 640x960 but if we use my smartphon huawie 1080x1920 we see espace in up and down .  
For this ask if you need to creat layout for most device models and move the button to Full screen

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [November 10, 2018, 3:04pm UTC](https://forum.defold.com/t/add-device-models-name/34397/7 "2018-11-10T15:04:11Z")

</div>

For gui components you should use the anchor properties to make a component stick to a certain percentage of distance from edges etc

> **[GUI scenes in Defold](https://defold.com/manuals/gui/)**
>
> This manual goes through the Defold GUI editor, the various types of GUI nodes and GUI scripting.

---

<div class="post-metadata">

**Author:** ![kouba06](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/kouba06/32/22245_2.png) [@kouba06](https://forum.defold.com/u/kouba06)\
**Post date:** [November 10, 2018, 3:23pm UTC](https://forum.defold.com/t/add-device-models-name/34397/8 "2018-11-10T15:23:57Z")

</div>

> [@britzl](#):
>
> For gui components you should use the anchor properties to make a component stick to a certain percentage of distance from edges etc

Is it enough to use **anchorY** to fill the screen with all the devices or is there another way  
Thanks for you and I apologize for the inconvenience

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [November 10, 2018, 3:43pm UTC](https://forum.defold.com/t/add-device-models-name/34397/9 "2018-11-10T15:43:26Z")

</div>

> [@kouba06](#):
>
> Is it enough to use **anchorY** to fill the screen with all the devices or is there another way

The purpose of the anchorX and Y properties are to control these things. If you set the anchorY property to top it “scales the vertical position of the node so it keeps the position from the top and bottom edges of the parent node or scene at the same percentage.” So yes, use anchorX and Y to get your UI to behave as you want it to on different screen resolutions.

Layouts are primarily used for transforming a gui from portrait to landscape mode or other situation where you need to rearrange your UI.

---

<div class="post-metadata">

**Author:** ![kouba06](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/kouba06/32/22245_2.png) [@kouba06](https://forum.defold.com/u/kouba06)\
**Post date:** [November 10, 2018, 9:33pm UTC](https://forum.defold.com/t/add-device-models-name/34397/10 "2018-11-10T21:33:26Z")

</div>

> [@britzl](#):
>
> Layouts are primarily used for transforming a gui from portrait to landscape mode or other situation where you need to rearrange your UI.

I understand what you mean  
Thank you @britzl for your interest 🙏
