You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Google Calendar application on Android, you can get an example of full-screen dialog when you create a new event. On a device with a small screen, the full-screen dialog fills the screen:
Nexus 4
But on a device with a larger screen, the dialog does not fill the screen horizontally or vertically (depending on the screen orientation and the screen size):
Nexus 10 (portrait)
Nexus 10 (landscape)
Nexus 7 (portrait)
Nexus 7 (landscape)
We can see that several parameters influence how the screen is filled. After several tests, I got the following results:
Landscape mode:
If parent.width / density < 600 then dialog.width = parent.width else dialog.width = parent.width / 2
dialog.height = parent.height
Portrait mode:
If parent.height / density < min_height then dialog.height = parent.height else dialog.height = parent.height / r1
If parent.height / density < min_height then dialog.width = parent.width else dialog.width = parent.width / r2
min_height, r1 and r2 have to be defined more precisely.
In my tests, I found min_height = 1280 but it could be lower since there is a big gap between my test devices (between 640 and 1280).
The ratio r1 seems to be around 1.12 but I don't have a clear idea about it. My tests gave me 1.1186833... (quite a strange value).
For r2, I got a "round" value, 1.25, that seems acceptable.
The specs don't talk about these cases but the full-screen dialogs look much better that way on bigger screens.
The text was updated successfully, but these errors were encountered:
https://material.io/guidelines/components/dialogs.html#dialogs-full-screen-dialogs
(Details of this issue are copied from papyros/qml-material#287)
In the Google Calendar application on Android, you can get an example of full-screen dialog when you create a new event. On a device with a small screen, the full-screen dialog fills the screen:
Nexus 4
But on a device with a larger screen, the dialog does not fill the screen horizontally or vertically (depending on the screen orientation and the screen size):
Nexus 10 (portrait)
Nexus 10 (landscape)
Nexus 7 (portrait)
Nexus 7 (landscape)
We can see that several parameters influence how the screen is filled. After several tests, I got the following results:
min_height, r1 and r2 have to be defined more precisely.
In my tests, I found min_height = 1280 but it could be lower since there is a big gap between my test devices (between 640 and 1280).
The ratio r1 seems to be around 1.12 but I don't have a clear idea about it. My tests gave me 1.1186833... (quite a strange value).
For r2, I got a "round" value, 1.25, that seems acceptable.
The specs don't talk about these cases but the full-screen dialogs look much better that way on bigger screens.
The text was updated successfully, but these errors were encountered: