SlideShare a Scribd company logo
1 of 20
Download to read offline
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 
How to design apps on Tizen Wearable devices with multi-resolution 
Webapp UI layout guide
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 2| Page 
1. Introduction ....................................................................................................... 4 
2. Single Layout for Multiple Devices .................................................................. 5 
Viewport and Other Meta Tags ........................................................................................................ 5 
Relative Layout ................................................................................................................................ 5 
Header and Footer Position ............................................................................................................. 7 
Flexible Media .................................................................................................................................. 9 
Exception in Product Support ........................................................................................................ 10 
Single Layout Conclusion .............................................................................................................. 11 
3. Multiple Layout for Multiple Devices ............................................................. 16 
Category Classification .................................................................................................................. 16 
W3C Media Queries ............................................................................................................. 17 
4. Summary .......................................................................................................... 20 
Table of Contents
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 3| Page 
Overview 
This document demonstrates how to design your application layout so that can run on multiple Tizen devices. It is targeted for 3rd party developers. 
The Web engine provides the basic mechanisms for fitting user content to target screen. However, ensure that the application runs well on multiple devices, you must understand those mechanisms in detail. 
A relative layout is a safer choice than fixed layout, because a relative layout helps to maintain usability even when the application runs on unexpected devices. To enhance usability even further, use different layouts for each device category.
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 4| Page 
1. Introduction 
Although the Web was originally designed to structure documents for large-scaled Internet world, with CSS (Cascading Style Sheet), JavaScript, and various device APIs, it is quickly evolving to a complete runtime environment for applications. In addition, its W3C open development model and the flexibility of its CSS-based presentation make it every developer’s choice as the next development platform. 
CSS is the key technology for flexible presentation, and it used to describe look formatting of HTML documents. The role of CSS is to determine how the logical structure of document is displayed to user. 
This document explains how, using some CSS techniques and Tizen Web engine mechanisms, you can design your Web application UI layout so that it displays properly on multiple devices. The document content includes: 
 Explanation of the auto-fitting mechanism of the Tizen Web engine. The document provides practical tips for using the mechanism to create a single layout that covers multiple devices. 
 Description and sample code for creating different layouts for each device category. 
 Summary of the useful tips.
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 5| Page 
2. Single Layout for Multiple Devices 
A typical application developer designs an optimized UI for a target device with fixed layout and high-quality resources. This approach usually results in a nice look for the end user, but can sometimes show an ugly layout, which makes the application unusable. And this unfortunate result can occur merely due to a change in device form factor. 
Since the presentation and business logic are strictly separated in a Web application, it handles device form factor change better than native applications. In this section, you learn how just one layout, taking advantage of Web technology, can ensure usability even on multiple devices with different form factors. 
The viewport is a screen area that the Web engine displays in UI and, world, meta tag used to inform the Web engine that this content is written for a specific form factor, such as device width. The viewport meta tag was introduced by Apple to fill the screen resolution gap between initial Smartphone (for example, 320 px) and PC (for example, 980 px). Basically, the viewport meta tag helps the Web engine to determine scale factor for the content on current device. 
To use the tag in an HTML file, set its name and content: 
<meta name=”viewport” content=”XXX”> 
As shown in the following code snippet, use viewport meta tag to tell Web engine which device width is targeted by the application. The Web engine can estimate scale factor based on target content size and real screen width. For example, usually almost all mobile applications have following viewport meta tag: 
<meta name=”viewport” content=”width=device-width,user-scalable=no”> 
which sets the viewport width to appropriate size depends on each device. if you want to set your content layout to the target width of 320 px on every mobile devices, use the following meta tag: 
<meta name=”viewport” content=”width=320”> 
The viewport meta tag has other properties, such as height, initial-scale, minimum-scale, maximum-scale, and user- scalable. However, do not use those properties unless you understand their exact meaning. Wrong values can cause the Web engine to incorrectly fit user content current device. 
The relative layout concept means that the element size of all content is set as a relative unit (such percentage), and not as absolute values (such pixels or points). In responsive Web design, this concept is also known “fluid grid” (for more information, google “responsive web design”). To achieve a layout that works on multiple devices, you only need to know about relative layout, not all the other concepts of responsive Web design. 
Viewport and Other Meta Tags 
Relative Layout
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 6| Page 
Implementing a relative layout is easy. You only have to set the width and height of each element as percentage, as shown in the following example. In example (Figure 1), the width and height of number_pad element is set to 100% and 70%, not 320 px 224 px. 
number_pad { width: 100%; height: 70%; } 
Figure 1. 320x320 calculator 
An application with this relative layout is auto-fitted when it runs on an unexpected device, such as the device with 360x480 resolutions shown in Figure 2. Even though this adjusted layout may not be as good the original, it is good enough, since it shows a usable application UI. 
Figure 2. 360x480 calculator with a relative layout 
number_pad
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 7| Page 
Figure 3 shows what happens if you use an absolute 320x320 layout. The presentation is definitely ugly (with an empty white space at the bottom) and usability reduced, although calculation logic itself still works. 
number_pad { width: 320px; height: 224px; } 
Figure 3. 360x480 calculator with an absolute 320x320 layout 
While the content layout itself becomes application UI on a Web page, typical mobile consists of a header area, content and footer area. With this trend, many mobile Web applications are designed by separating the three areas explicitly, as shown in Figure 4. 
Figure 4. Typical mobile Web application layout 
The most common mistake you can make is not to set the place of header and footer areas clearly. In case header, the side-effect is relatively small. However, a wrongly defined footer area can be quite visible and lead to poor usability. Figure 5 shows the original layout of a pedometer application that consists header, content, and footer, with a Stop button set in the footer area. 
Header and Footer Position 
Header 
Content 
Footer
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 8| Page 
Figure 5. 320x320 sample Web application 
In this case, if the position of footer is not defined explicitly or and bottom properties do have proper values, an ugly layout can be displayed on unexpected device, such as the 360x480 screen shown in Figure 6. 
Figure 6. Layout on 360x480 
To make the layout correct, define position property as fixed and set bottom explicitly 0 px: 
.footer { position: fixed; bottom: 0px; } 
Figure 7 shows the same Web application running on unexpected device after footer properties are defined properly. With the correct values, the Web application is usable even on a new target, not planned during development phase. Note that if a relative layout is still applied to the content area, result an even better and further improved usability.
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 9| Page 
Figure 7. Usable layout on 360x480 
One of key elements used in the content area is a media element, including image and video. As all other elements, the media elements also must be placed within a relative layout to allow the application flexibly handle resolution changes. When such relative sizing is applied to a media element, it called “flexible media” in responsive Web design. 
The main issue when making media element size relative is to ensure that the usable ratio does not change. Figure 8 shows a video element that works on both 320x320 and 360x480 resolutions, even though the aspect ratio of screen is changed and scaled up. The opposite is shown in Figure 9, where usability decreases as the video element is simply scaled up based on the aspect ratio change. 
Basically, when handling media elements, you want to keep the size or ratio of element same as in initially targeted device, even when displayed using a different resolution and aspect ratio (as shown in Figure 8). To achieve this, set the width and height properties of media element with percentage auto keyword. 
Flexible Media
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 10| Page 
.video iframe { width: 100%; height: auto; } 
Figure 8. Flexible media on 320x320 and 360x480 
If you set the video element size using a fixed size, as shown in Figure 9, you get no benefit from the increased resolution, and the layout on whole screen becomes inharmonious, decreasing usability. 
.video iframe { width: 320px; height: 240px; } 
Figure 9. Fixed size media element 
Tizen Web Runtime provides a mechanism that helps you to migrate from previously released product new product. This is a product-specific feature, and its behavior is not guaranteed on a normal Tizen-based device. Currently, migration is supported for Gear2 applications. The migration allows you to run a Gear2 application on Gear S device, while keeping the 1:1 aspect ratio and performing a scale-up without any modification of the source code (the aspect ratio of Gear2 is 1:1, while of Gear S is 1:1.3). 
Exception in Product Support
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 11| Page 
This mechanism is an exception to the previous policy, and was introduced support clock faces on a watch device. On the clock face application UI, just scaling does not prevent usability drop if aspect ratio is kept, as shown in Figure 10. 
Figure 10. Clock face applications with the basic policy 
If the aspect ratio and view position changes are critical for usability of application, you must add following preference value line to the config.xml file in wgt package: 
<preference name="view-compat" value="square"/> 
When Tizen Web Runtime reads this preference from the config.xml file, it assumes that application is written for a square-resolution-based device and keeping the aspect ratio and center-positioning is essential for the right UX. In this case, the Web Runtime scales up application view size and puts on center of screen with 1:1 aspect ratio. 
Figure 11. Exception handling with scale-up and center-positioning 
This feature is not the recommended way to support any future device. However, it can be useful if you want quickly migrate your previous Gear2 application to a Gear S device. 
This section illustrates a complete application layout that takes advantage of the issues discussed in previous sections. In particular, it shows how to set the viewport properly to help the Web engine scaling mechanism and how to create a CSS-based layout. 
First of all, set the targeted size content area as 320 px in viewport meta tag, and disable user-scalable property, as shown in the following code snippet. 
<html> 
<head> 
Single Layout Conclusion 
320 
320 
480 
360 
320 
320 
480 
360
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 12| Page 
<link href="css/style.css" rel="stylesheet" type="text/css"> 
<meta name="viewport" content="width=320px,user-scalable=no" /> 
</head> 
<body> 
<main> 
<div class="tile left"> 
<div id="box1" class="box"></div> 
</div> 
<div class="tile right"> 
<div id="box2" class="box"></div> 
</div> 
<div class="tile left"> 
<div id="box3" class="box"></div> 
</div> 
<div class="tile right"> 
<div id="box4" class="box"></div> 
</div> 
</main> 
</body> 
</html> 
In the above HTML code, content area consists of 4 <div> box elements, and their UI layout is described in style.css file. The following CSS code programs the layout and specific box element styles that were defined in the HTML file. 
The code snippet shows that the content size is set to be same as viewport size. Each box filled with a different color and placed so that it fills a quarter of the content area. Because each box size is defined with width and height of 100%, the relative size each box element remains same even if viewport changes. 
/* Default, used for all*/ 
* { box-sizing: border-box; } 
body, div, h1 { margin: 0px; padding: } 
html, body { width: 100%; height: overflow-x: hidden; } 
#box1 { background-color: rgb(255, 141); } 
#box2 { background-color: rgb(165, 241, 238); } 
#box3 { background-color: rgb(248, 179, 179); } 
#box4 { background-color: rgb(192, 161, 246); } 
.tile 
{ 
width: 50%; 
height: 50%; 
float: left; 
} 
.left { padding: 10px 5px 10px; } 
.right { padding: 10px 5px 5px; } 
.box 
{ 
width: 100%; 
height: 100%; 
}
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 13| Page 
Figure 12 shows a final view in 320px device set as target the HTML file. As defined CSS file, content area fills the whole screen, 320x320 pixels, and 4 box elements equally divide the area. 
Figure 12. Original layout on a target device 
Figure 13 shows that the relative layout and scaling are correctly applied even when the same application is run on a mobile device with the aspect ratio of 16:9. 
Figure 13. Scaled layout on a 16:9 mobile device 
The following code snippet shows an example where the background color is replaced with image while layout is exactly same as in the 4 box example. The Figure 14 and Figure 15 show how the layout including media elements (such as images) functions exactly like the basic box layout. 
/* Default, used for all*/ 
* { box-sizing: border-box; } 
body, div, h1 { margin: 0px; padding: } 
html, body { width: 100%; height: overflow-x: hidden; } 
#box1 { background-color: rgb(255, 141); } 
#box2 { background-color: rgb(165, 241, 238); }
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 14| Page 
#box3 { background-color: rgb(248, 179, 179); } 
#box4 { background-color: rgb(192, 161, 246); } 
.tile 
{ 
width: 50%; 
height: 50%; 
float: left; 
} 
.left { padding: 10px 5px 10px; } 
.right { padding: 10px 5px 5px; } 
.box 
{ 
width: 100%; 
height: 100%; 
padding: 20px; 
background: no-repeat center; 
background-size: 100% 100%; 
} 
#box1 { background-image: url('../a.png'); } 
#box2 { background-image: url('../b.png'); } 
#box3 { background-image: url('../c.png'); } 
#box4 { background-image: url('../d.png'); } 
Figure 14. Image-based layout on a target device
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 15| Page 
Figure 15. Image-based scaled layout on a 16:9 mobile device
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 16| Page 
3. Multiple Layout for Devices 
The first part of the document explained how to develop an application usable in various device categories by taking advantage of the viewport fitting feature provided by platform for a single layout. In many cases, desired end result can be achieved using scaling and a relative layout. However, this approach does not always provide the best quality for the end user. 
This section describes how you can support the best possible layout and usability with some additional development efforts. For instance, you can create an application which, on a tablet, shows the main information (clock face) while also delivering more meaningful information (calendar), while on a watch device only the main clock face) is displayed. This kind of end result, shown in figure 16, cannot be achieved by only scaling up the whole layout of the watch device. 
Figure 16. Application for a watch and tablet 
W3C CSS3 Media Queries already support the majority of techniques needed to provide category-based layouts. This section you learn in detail how to support the optimal layout using CSS techniques. 
The difference from the single layout case example is that content width of viewport set to “device-width”. This sets the layout viewport width to ideal width. Setting “device-width” tells the Web engine that the application adapts to the device width. In short, “device-width” setting is needed to create an adaptive and responsive Web application. 
To use the tag in an HTML file, set its name and content: 
<meta name="viewport" content="width=device-width, user-scalable=no" /> 
When creating multiple layouts, you must first configure the layout categories. In other words, a classifying category is needed for layout fitting on the current executable environment. Media queries are supported in CSS3 to give Web application information to the executable environment. 
Viewport Setting for Multiple Layouts 
Category Classification
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 17| Page 
W3C Media Queries 
Media queries consist of a media type and expressions features. 
The media types indicate the on which current Web application is running. They are defined in HTML4. The complete list of media types is: ‘aural’, braille’, handheld’, print’, projection’, screen’, tty’, and tv’. You can declare that sections apply to certain media types inside a CSS style sheet. As in the following example, you can declare “screen” as a media type and describe its layout inside {…}. That code applies the {…} when Web application is run on the executable context screen type. 
@media screen { ... }
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 18| Page 
Several media queries can be combined in a media query list to configure the executable environment. The following example shows a case in which the Web application runs on executable environment having “screen” media type and a 500 pixel minimum width. Its final view shows the layout inside {..} to the end user. 
@media screen and (min-width:500px) { ... } 
Table 1 lists the CSS media features, which you can use to specify layout utilizing queries. 
Table 1. Media features 
Feature 
Value 
Min/Max 
Description 
color 
integer 
yes 
Number of bits per a color component 
color-index 
integer 
yes 
Number of entries in the color lookup table 
device-aspect-ratio 
integer/integer 
yes 
Aspect ratio 
device-height 
length 
yes 
Output device height 
device-width 
length 
yes 
Output device width 
grid 
integer 
no 
Set to true for a grid-based device 
height 
length 
yes 
Rendering surface height 
monochrome 
integer 
yes 
Number of bits per pixel in a monochrome frame buffer 
resolution 
resolution ("dpi" or "dpcm") 
yes 
Resolution 
scan 
"progressive" or interlaced" 
no 
Scanning process of the "tv" media types 
width 
length 
yes 
Rendering surface width 
As shown above, media features can be combined when a detailed layout configuration is needed. 
You can configure the device landscape and portrait mode using “device-aspect-ratio” in W3C Media Queries. This approach is already commonly used in creating mobile Web applications. The following example shows how the max-device-aspect-ratio feature is used. 
If you use the orientation:portrait/landscape feature, layout can change unexpectedly when virtual keypad is displayed. To avoid the problem, use device-aspect-ratio to configure the portrait and landscape mode. 
@media screen and (max-width: 320px) and (max-device-aspect-ratio: 1/1) 
{ 
// For portrait mode 
} 
@media screen and (max-width: 640px) and (min-device-aspect-ratio: 11/10) 
{ 
Classification for Display Mode (Landscape and Portrait)
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 19| Page 
// For landscape mode 
}
How to design apps on Tizen Wearable devices with multi-resolution 
Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein 
are licensed under BSD-3-Clause. 
For details, see the Content License. 
. 20| Page 
4. Summary 
This document offered some important tips for developers to compose a Web application UI layout that performs on multiple devices. 
At the beginning, it described how you can create 1 application layout that works in all devices. In the second half, showed how to create multiple layouts for devices using CSS media queries. 
The document also provided full HTML/CSS samples that allow you to “copy and paste” the code test how it works on Tizen.

More Related Content

Similar to [Tutorial] flexible designs for the gear

IRJET- A Personalized Web Browser
IRJET- A Personalized Web BrowserIRJET- A Personalized Web Browser
IRJET- A Personalized Web BrowserIRJET Journal
 
IRJET- A Personalized Web Browser
IRJET-  	  A Personalized Web BrowserIRJET-  	  A Personalized Web Browser
IRJET- A Personalized Web BrowserIRJET Journal
 
The best development services available for Pakistan.ppt
The best development services available for Pakistan.pptThe best development services available for Pakistan.ppt
The best development services available for Pakistan.pptConnect Solutions
 
Web Development SEO Expate BD LTD 1 01.02.2023 .pdf
Web Development SEO Expate BD LTD 1 01.02.2023 .pdfWeb Development SEO Expate BD LTD 1 01.02.2023 .pdf
Web Development SEO Expate BD LTD 1 01.02.2023 .pdfSeo Expate BD LTD
 
How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi...
 How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi... How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi...
How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi...Aimore Technologies
 
Benefits of Using ASP.NET For Web Development for Businesses In 2023
Benefits of Using ASP.NET For Web Development for Businesses In 2023Benefits of Using ASP.NET For Web Development for Businesses In 2023
Benefits of Using ASP.NET For Web Development for Businesses In 2023CMARIX TechnoLabs
 
Browser sizes - November 2000
Browser sizes - November 2000Browser sizes - November 2000
Browser sizes - November 2000William Cookson
 
Optimizing Sites for Mobile Devices
Optimizing Sites for Mobile DevicesOptimizing Sites for Mobile Devices
Optimizing Sites for Mobile Devicesjameswillweb
 
Azure IoT Hub on a Toradex Colibri VF61 – Part 1 - Sending data to the cloud
Azure IoT Hub on a Toradex Colibri VF61 – Part 1 - Sending data to the cloudAzure IoT Hub on a Toradex Colibri VF61 – Part 1 - Sending data to the cloud
Azure IoT Hub on a Toradex Colibri VF61 – Part 1 - Sending data to the cloudToradex
 
web development.pdf
web development.pdfweb development.pdf
web development.pdfJessicaArifa
 
Liquidizer.js: A Responsive Web Design Algorithm
Liquidizer.js: A Responsive Web Design AlgorithmLiquidizer.js: A Responsive Web Design Algorithm
Liquidizer.js: A Responsive Web Design Algorithmtheijes
 
Web technology and commerce unit 2
Web technology and commerce unit 2Web technology and commerce unit 2
Web technology and commerce unit 2arun0501
 
The most efficient development tool is now available in Pakistan.ppt
The most efficient development tool is now available in Pakistan.pptThe most efficient development tool is now available in Pakistan.ppt
The most efficient development tool is now available in Pakistan.pptConnect Solutions
 
The most effective development service is available to Pakistan.ppt
The most effective development service is available to Pakistan.pptThe most effective development service is available to Pakistan.ppt
The most effective development service is available to Pakistan.pptConnect Solutions
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignTung Dang
 
Over view of Technologies
Over view of TechnologiesOver view of Technologies
Over view of TechnologiesChris Mitchell
 
Android Tutorial
Android TutorialAndroid Tutorial
Android TutorialFun2Do Labs
 
Responsive web designing ppt(1)
Responsive web designing ppt(1)Responsive web designing ppt(1)
Responsive web designing ppt(1)admecindia1
 
The Guide to Website Development for Beginners.pptx
The Guide to Website Development for Beginners.pptxThe Guide to Website Development for Beginners.pptx
The Guide to Website Development for Beginners.pptxConnect Solutions
 

Similar to [Tutorial] flexible designs for the gear (20)

IRJET- A Personalized Web Browser
IRJET- A Personalized Web BrowserIRJET- A Personalized Web Browser
IRJET- A Personalized Web Browser
 
IRJET- A Personalized Web Browser
IRJET-  	  A Personalized Web BrowserIRJET-  	  A Personalized Web Browser
IRJET- A Personalized Web Browser
 
The best development services available for Pakistan.ppt
The best development services available for Pakistan.pptThe best development services available for Pakistan.ppt
The best development services available for Pakistan.ppt
 
Web Development SEO Expate BD LTD 1 01.02.2023 .pdf
Web Development SEO Expate BD LTD 1 01.02.2023 .pdfWeb Development SEO Expate BD LTD 1 01.02.2023 .pdf
Web Development SEO Expate BD LTD 1 01.02.2023 .pdf
 
How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi...
 How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi... How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi...
How DotNet, SharePoint, and Azure helps to build a Custom Web Application wi...
 
Benefits of Using ASP.NET For Web Development for Businesses In 2023
Benefits of Using ASP.NET For Web Development for Businesses In 2023Benefits of Using ASP.NET For Web Development for Businesses In 2023
Benefits of Using ASP.NET For Web Development for Businesses In 2023
 
Browser sizes - November 2000
Browser sizes - November 2000Browser sizes - November 2000
Browser sizes - November 2000
 
Optimizing Sites for Mobile Devices
Optimizing Sites for Mobile DevicesOptimizing Sites for Mobile Devices
Optimizing Sites for Mobile Devices
 
Azure IoT Hub on a Toradex Colibri VF61 – Part 1 - Sending data to the cloud
Azure IoT Hub on a Toradex Colibri VF61 – Part 1 - Sending data to the cloudAzure IoT Hub on a Toradex Colibri VF61 – Part 1 - Sending data to the cloud
Azure IoT Hub on a Toradex Colibri VF61 – Part 1 - Sending data to the cloud
 
web development.pdf
web development.pdfweb development.pdf
web development.pdf
 
Liquidizer.js: A Responsive Web Design Algorithm
Liquidizer.js: A Responsive Web Design AlgorithmLiquidizer.js: A Responsive Web Design Algorithm
Liquidizer.js: A Responsive Web Design Algorithm
 
Web technology and commerce unit 2
Web technology and commerce unit 2Web technology and commerce unit 2
Web technology and commerce unit 2
 
The most efficient development tool is now available in Pakistan.ppt
The most efficient development tool is now available in Pakistan.pptThe most efficient development tool is now available in Pakistan.ppt
The most efficient development tool is now available in Pakistan.ppt
 
The most effective development service is available to Pakistan.ppt
The most effective development service is available to Pakistan.pptThe most effective development service is available to Pakistan.ppt
The most effective development service is available to Pakistan.ppt
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Over view of Technologies
Over view of TechnologiesOver view of Technologies
Over view of Technologies
 
Android Tutorial
Android TutorialAndroid Tutorial
Android Tutorial
 
Responsive Web Designing Fundamentals
Responsive Web Designing FundamentalsResponsive Web Designing Fundamentals
Responsive Web Designing Fundamentals
 
Responsive web designing ppt(1)
Responsive web designing ppt(1)Responsive web designing ppt(1)
Responsive web designing ppt(1)
 
The Guide to Website Development for Beginners.pptx
The Guide to Website Development for Beginners.pptxThe Guide to Website Development for Beginners.pptx
The Guide to Website Development for Beginners.pptx
 

More from Ryo Jin

Why is EFL used on Tizen?
Why is EFL used on Tizen?Why is EFL used on Tizen?
Why is EFL used on Tizen?Ryo Jin
 
Samsung Z4 User Manual
Samsung Z4 User ManualSamsung Z4 User Manual
Samsung Z4 User ManualRyo Jin
 
Samsung ARTIK 050 (ARTIK ZERO) Modules Data Sheet
Samsung ARTIK 050 (ARTIK ZERO) Modules Data SheetSamsung ARTIK 050 (ARTIK ZERO) Modules Data Sheet
Samsung ARTIK 050 (ARTIK ZERO) Modules Data SheetRyo Jin
 
Introduction to Watch Face Development with Tizen Studio
Introduction to Watch Face Development with Tizen StudioIntroduction to Watch Face Development with Tizen Studio
Introduction to Watch Face Development with Tizen StudioRyo Jin
 
Tizen 3.0's Window System Integration Layer of OpenGLES/EGL & Vulkan Driver
Tizen 3.0's Window System Integration Layer of OpenGLES/EGL & Vulkan DriverTizen 3.0's Window System Integration Layer of OpenGLES/EGL & Vulkan Driver
Tizen 3.0's Window System Integration Layer of OpenGLES/EGL & Vulkan DriverRyo Jin
 
Panduan Penggunaan Perangkat Wearable Tizen
Panduan Penggunaan Perangkat Wearable TizenPanduan Penggunaan Perangkat Wearable Tizen
Panduan Penggunaan Perangkat Wearable TizenRyo Jin
 
Cara Menggunakan Smartphone Tizen
Cara Menggunakan Smartphone TizenCara Menggunakan Smartphone Tizen
Cara Menggunakan Smartphone TizenRyo Jin
 
Gear Fit2 Watchface Design Guide
Gear Fit2 Watchface Design GuideGear Fit2 Watchface Design Guide
Gear Fit2 Watchface Design GuideRyo Jin
 
Samsung Indonesia: Tizen Store
Samsung Indonesia: Tizen StoreSamsung Indonesia: Tizen Store
Samsung Indonesia: Tizen StoreRyo Jin
 
Samsung Indonesia: Tizen Wearables
Samsung Indonesia: Tizen WearablesSamsung Indonesia: Tizen Wearables
Samsung Indonesia: Tizen WearablesRyo Jin
 
Samsung Indonesia: Tizen Web Apps
Samsung Indonesia: Tizen Web AppsSamsung Indonesia: Tizen Web Apps
Samsung Indonesia: Tizen Web AppsRyo Jin
 
Samsung Indonesia: Tizen Native App
Samsung Indonesia: Tizen Native AppSamsung Indonesia: Tizen Native App
Samsung Indonesia: Tizen Native AppRyo Jin
 
Samsung Indonesia: Tizen Platform Overview and IoT
Samsung Indonesia: Tizen Platform Overview and IoTSamsung Indonesia: Tizen Platform Overview and IoT
Samsung Indonesia: Tizen Platform Overview and IoTRyo Jin
 
Russian Tizen Project
Russian Tizen ProjectRussian Tizen Project
Russian Tizen ProjectRyo Jin
 
Samsung SM-R360 Tizen User Manual
Samsung SM-R360 Tizen User ManualSamsung SM-R360 Tizen User Manual
Samsung SM-R360 Tizen User ManualRyo Jin
 
Tizen Micro Profile for IoT device
Tizen Micro Profile for IoT deviceTizen Micro Profile for IoT device
Tizen Micro Profile for IoT deviceRyo Jin
 
Panduan Dasar Pemrograman Tizen
Panduan Dasar Pemrograman TizenPanduan Dasar Pemrograman Tizen
Panduan Dasar Pemrograman TizenRyo Jin
 
The Story of Enlightenment, EFL, Tizen and Wayland
The Story of Enlightenment, EFL, Tizen and WaylandThe Story of Enlightenment, EFL, Tizen and Wayland
The Story of Enlightenment, EFL, Tizen and WaylandRyo Jin
 
Tizen PASS
Tizen PASSTizen PASS
Tizen PASSRyo Jin
 
Tizen PASS
Tizen PASSTizen PASS
Tizen PASSRyo Jin
 

More from Ryo Jin (20)

Why is EFL used on Tizen?
Why is EFL used on Tizen?Why is EFL used on Tizen?
Why is EFL used on Tizen?
 
Samsung Z4 User Manual
Samsung Z4 User ManualSamsung Z4 User Manual
Samsung Z4 User Manual
 
Samsung ARTIK 050 (ARTIK ZERO) Modules Data Sheet
Samsung ARTIK 050 (ARTIK ZERO) Modules Data SheetSamsung ARTIK 050 (ARTIK ZERO) Modules Data Sheet
Samsung ARTIK 050 (ARTIK ZERO) Modules Data Sheet
 
Introduction to Watch Face Development with Tizen Studio
Introduction to Watch Face Development with Tizen StudioIntroduction to Watch Face Development with Tizen Studio
Introduction to Watch Face Development with Tizen Studio
 
Tizen 3.0's Window System Integration Layer of OpenGLES/EGL & Vulkan Driver
Tizen 3.0's Window System Integration Layer of OpenGLES/EGL & Vulkan DriverTizen 3.0's Window System Integration Layer of OpenGLES/EGL & Vulkan Driver
Tizen 3.0's Window System Integration Layer of OpenGLES/EGL & Vulkan Driver
 
Panduan Penggunaan Perangkat Wearable Tizen
Panduan Penggunaan Perangkat Wearable TizenPanduan Penggunaan Perangkat Wearable Tizen
Panduan Penggunaan Perangkat Wearable Tizen
 
Cara Menggunakan Smartphone Tizen
Cara Menggunakan Smartphone TizenCara Menggunakan Smartphone Tizen
Cara Menggunakan Smartphone Tizen
 
Gear Fit2 Watchface Design Guide
Gear Fit2 Watchface Design GuideGear Fit2 Watchface Design Guide
Gear Fit2 Watchface Design Guide
 
Samsung Indonesia: Tizen Store
Samsung Indonesia: Tizen StoreSamsung Indonesia: Tizen Store
Samsung Indonesia: Tizen Store
 
Samsung Indonesia: Tizen Wearables
Samsung Indonesia: Tizen WearablesSamsung Indonesia: Tizen Wearables
Samsung Indonesia: Tizen Wearables
 
Samsung Indonesia: Tizen Web Apps
Samsung Indonesia: Tizen Web AppsSamsung Indonesia: Tizen Web Apps
Samsung Indonesia: Tizen Web Apps
 
Samsung Indonesia: Tizen Native App
Samsung Indonesia: Tizen Native AppSamsung Indonesia: Tizen Native App
Samsung Indonesia: Tizen Native App
 
Samsung Indonesia: Tizen Platform Overview and IoT
Samsung Indonesia: Tizen Platform Overview and IoTSamsung Indonesia: Tizen Platform Overview and IoT
Samsung Indonesia: Tizen Platform Overview and IoT
 
Russian Tizen Project
Russian Tizen ProjectRussian Tizen Project
Russian Tizen Project
 
Samsung SM-R360 Tizen User Manual
Samsung SM-R360 Tizen User ManualSamsung SM-R360 Tizen User Manual
Samsung SM-R360 Tizen User Manual
 
Tizen Micro Profile for IoT device
Tizen Micro Profile for IoT deviceTizen Micro Profile for IoT device
Tizen Micro Profile for IoT device
 
Panduan Dasar Pemrograman Tizen
Panduan Dasar Pemrograman TizenPanduan Dasar Pemrograman Tizen
Panduan Dasar Pemrograman Tizen
 
The Story of Enlightenment, EFL, Tizen and Wayland
The Story of Enlightenment, EFL, Tizen and WaylandThe Story of Enlightenment, EFL, Tizen and Wayland
The Story of Enlightenment, EFL, Tizen and Wayland
 
Tizen PASS
Tizen PASSTizen PASS
Tizen PASS
 
Tizen PASS
Tizen PASSTizen PASS
Tizen PASS
 

Recently uploaded

Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 

[Tutorial] flexible designs for the gear

  • 1. Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . How to design apps on Tizen Wearable devices with multi-resolution Webapp UI layout guide
  • 2. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 2| Page 1. Introduction ....................................................................................................... 4 2. Single Layout for Multiple Devices .................................................................. 5 Viewport and Other Meta Tags ........................................................................................................ 5 Relative Layout ................................................................................................................................ 5 Header and Footer Position ............................................................................................................. 7 Flexible Media .................................................................................................................................. 9 Exception in Product Support ........................................................................................................ 10 Single Layout Conclusion .............................................................................................................. 11 3. Multiple Layout for Multiple Devices ............................................................. 16 Category Classification .................................................................................................................. 16 W3C Media Queries ............................................................................................................. 17 4. Summary .......................................................................................................... 20 Table of Contents
  • 3. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 3| Page Overview This document demonstrates how to design your application layout so that can run on multiple Tizen devices. It is targeted for 3rd party developers. The Web engine provides the basic mechanisms for fitting user content to target screen. However, ensure that the application runs well on multiple devices, you must understand those mechanisms in detail. A relative layout is a safer choice than fixed layout, because a relative layout helps to maintain usability even when the application runs on unexpected devices. To enhance usability even further, use different layouts for each device category.
  • 4. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 4| Page 1. Introduction Although the Web was originally designed to structure documents for large-scaled Internet world, with CSS (Cascading Style Sheet), JavaScript, and various device APIs, it is quickly evolving to a complete runtime environment for applications. In addition, its W3C open development model and the flexibility of its CSS-based presentation make it every developer’s choice as the next development platform. CSS is the key technology for flexible presentation, and it used to describe look formatting of HTML documents. The role of CSS is to determine how the logical structure of document is displayed to user. This document explains how, using some CSS techniques and Tizen Web engine mechanisms, you can design your Web application UI layout so that it displays properly on multiple devices. The document content includes:  Explanation of the auto-fitting mechanism of the Tizen Web engine. The document provides practical tips for using the mechanism to create a single layout that covers multiple devices.  Description and sample code for creating different layouts for each device category.  Summary of the useful tips.
  • 5. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 5| Page 2. Single Layout for Multiple Devices A typical application developer designs an optimized UI for a target device with fixed layout and high-quality resources. This approach usually results in a nice look for the end user, but can sometimes show an ugly layout, which makes the application unusable. And this unfortunate result can occur merely due to a change in device form factor. Since the presentation and business logic are strictly separated in a Web application, it handles device form factor change better than native applications. In this section, you learn how just one layout, taking advantage of Web technology, can ensure usability even on multiple devices with different form factors. The viewport is a screen area that the Web engine displays in UI and, world, meta tag used to inform the Web engine that this content is written for a specific form factor, such as device width. The viewport meta tag was introduced by Apple to fill the screen resolution gap between initial Smartphone (for example, 320 px) and PC (for example, 980 px). Basically, the viewport meta tag helps the Web engine to determine scale factor for the content on current device. To use the tag in an HTML file, set its name and content: <meta name=”viewport” content=”XXX”> As shown in the following code snippet, use viewport meta tag to tell Web engine which device width is targeted by the application. The Web engine can estimate scale factor based on target content size and real screen width. For example, usually almost all mobile applications have following viewport meta tag: <meta name=”viewport” content=”width=device-width,user-scalable=no”> which sets the viewport width to appropriate size depends on each device. if you want to set your content layout to the target width of 320 px on every mobile devices, use the following meta tag: <meta name=”viewport” content=”width=320”> The viewport meta tag has other properties, such as height, initial-scale, minimum-scale, maximum-scale, and user- scalable. However, do not use those properties unless you understand their exact meaning. Wrong values can cause the Web engine to incorrectly fit user content current device. The relative layout concept means that the element size of all content is set as a relative unit (such percentage), and not as absolute values (such pixels or points). In responsive Web design, this concept is also known “fluid grid” (for more information, google “responsive web design”). To achieve a layout that works on multiple devices, you only need to know about relative layout, not all the other concepts of responsive Web design. Viewport and Other Meta Tags Relative Layout
  • 6. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 6| Page Implementing a relative layout is easy. You only have to set the width and height of each element as percentage, as shown in the following example. In example (Figure 1), the width and height of number_pad element is set to 100% and 70%, not 320 px 224 px. number_pad { width: 100%; height: 70%; } Figure 1. 320x320 calculator An application with this relative layout is auto-fitted when it runs on an unexpected device, such as the device with 360x480 resolutions shown in Figure 2. Even though this adjusted layout may not be as good the original, it is good enough, since it shows a usable application UI. Figure 2. 360x480 calculator with a relative layout number_pad
  • 7. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 7| Page Figure 3 shows what happens if you use an absolute 320x320 layout. The presentation is definitely ugly (with an empty white space at the bottom) and usability reduced, although calculation logic itself still works. number_pad { width: 320px; height: 224px; } Figure 3. 360x480 calculator with an absolute 320x320 layout While the content layout itself becomes application UI on a Web page, typical mobile consists of a header area, content and footer area. With this trend, many mobile Web applications are designed by separating the three areas explicitly, as shown in Figure 4. Figure 4. Typical mobile Web application layout The most common mistake you can make is not to set the place of header and footer areas clearly. In case header, the side-effect is relatively small. However, a wrongly defined footer area can be quite visible and lead to poor usability. Figure 5 shows the original layout of a pedometer application that consists header, content, and footer, with a Stop button set in the footer area. Header and Footer Position Header Content Footer
  • 8. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 8| Page Figure 5. 320x320 sample Web application In this case, if the position of footer is not defined explicitly or and bottom properties do have proper values, an ugly layout can be displayed on unexpected device, such as the 360x480 screen shown in Figure 6. Figure 6. Layout on 360x480 To make the layout correct, define position property as fixed and set bottom explicitly 0 px: .footer { position: fixed; bottom: 0px; } Figure 7 shows the same Web application running on unexpected device after footer properties are defined properly. With the correct values, the Web application is usable even on a new target, not planned during development phase. Note that if a relative layout is still applied to the content area, result an even better and further improved usability.
  • 9. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 9| Page Figure 7. Usable layout on 360x480 One of key elements used in the content area is a media element, including image and video. As all other elements, the media elements also must be placed within a relative layout to allow the application flexibly handle resolution changes. When such relative sizing is applied to a media element, it called “flexible media” in responsive Web design. The main issue when making media element size relative is to ensure that the usable ratio does not change. Figure 8 shows a video element that works on both 320x320 and 360x480 resolutions, even though the aspect ratio of screen is changed and scaled up. The opposite is shown in Figure 9, where usability decreases as the video element is simply scaled up based on the aspect ratio change. Basically, when handling media elements, you want to keep the size or ratio of element same as in initially targeted device, even when displayed using a different resolution and aspect ratio (as shown in Figure 8). To achieve this, set the width and height properties of media element with percentage auto keyword. Flexible Media
  • 10. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 10| Page .video iframe { width: 100%; height: auto; } Figure 8. Flexible media on 320x320 and 360x480 If you set the video element size using a fixed size, as shown in Figure 9, you get no benefit from the increased resolution, and the layout on whole screen becomes inharmonious, decreasing usability. .video iframe { width: 320px; height: 240px; } Figure 9. Fixed size media element Tizen Web Runtime provides a mechanism that helps you to migrate from previously released product new product. This is a product-specific feature, and its behavior is not guaranteed on a normal Tizen-based device. Currently, migration is supported for Gear2 applications. The migration allows you to run a Gear2 application on Gear S device, while keeping the 1:1 aspect ratio and performing a scale-up without any modification of the source code (the aspect ratio of Gear2 is 1:1, while of Gear S is 1:1.3). Exception in Product Support
  • 11. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 11| Page This mechanism is an exception to the previous policy, and was introduced support clock faces on a watch device. On the clock face application UI, just scaling does not prevent usability drop if aspect ratio is kept, as shown in Figure 10. Figure 10. Clock face applications with the basic policy If the aspect ratio and view position changes are critical for usability of application, you must add following preference value line to the config.xml file in wgt package: <preference name="view-compat" value="square"/> When Tizen Web Runtime reads this preference from the config.xml file, it assumes that application is written for a square-resolution-based device and keeping the aspect ratio and center-positioning is essential for the right UX. In this case, the Web Runtime scales up application view size and puts on center of screen with 1:1 aspect ratio. Figure 11. Exception handling with scale-up and center-positioning This feature is not the recommended way to support any future device. However, it can be useful if you want quickly migrate your previous Gear2 application to a Gear S device. This section illustrates a complete application layout that takes advantage of the issues discussed in previous sections. In particular, it shows how to set the viewport properly to help the Web engine scaling mechanism and how to create a CSS-based layout. First of all, set the targeted size content area as 320 px in viewport meta tag, and disable user-scalable property, as shown in the following code snippet. <html> <head> Single Layout Conclusion 320 320 480 360 320 320 480 360
  • 12. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 12| Page <link href="css/style.css" rel="stylesheet" type="text/css"> <meta name="viewport" content="width=320px,user-scalable=no" /> </head> <body> <main> <div class="tile left"> <div id="box1" class="box"></div> </div> <div class="tile right"> <div id="box2" class="box"></div> </div> <div class="tile left"> <div id="box3" class="box"></div> </div> <div class="tile right"> <div id="box4" class="box"></div> </div> </main> </body> </html> In the above HTML code, content area consists of 4 <div> box elements, and their UI layout is described in style.css file. The following CSS code programs the layout and specific box element styles that were defined in the HTML file. The code snippet shows that the content size is set to be same as viewport size. Each box filled with a different color and placed so that it fills a quarter of the content area. Because each box size is defined with width and height of 100%, the relative size each box element remains same even if viewport changes. /* Default, used for all*/ * { box-sizing: border-box; } body, div, h1 { margin: 0px; padding: } html, body { width: 100%; height: overflow-x: hidden; } #box1 { background-color: rgb(255, 141); } #box2 { background-color: rgb(165, 241, 238); } #box3 { background-color: rgb(248, 179, 179); } #box4 { background-color: rgb(192, 161, 246); } .tile { width: 50%; height: 50%; float: left; } .left { padding: 10px 5px 10px; } .right { padding: 10px 5px 5px; } .box { width: 100%; height: 100%; }
  • 13. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 13| Page Figure 12 shows a final view in 320px device set as target the HTML file. As defined CSS file, content area fills the whole screen, 320x320 pixels, and 4 box elements equally divide the area. Figure 12. Original layout on a target device Figure 13 shows that the relative layout and scaling are correctly applied even when the same application is run on a mobile device with the aspect ratio of 16:9. Figure 13. Scaled layout on a 16:9 mobile device The following code snippet shows an example where the background color is replaced with image while layout is exactly same as in the 4 box example. The Figure 14 and Figure 15 show how the layout including media elements (such as images) functions exactly like the basic box layout. /* Default, used for all*/ * { box-sizing: border-box; } body, div, h1 { margin: 0px; padding: } html, body { width: 100%; height: overflow-x: hidden; } #box1 { background-color: rgb(255, 141); } #box2 { background-color: rgb(165, 241, 238); }
  • 14. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 14| Page #box3 { background-color: rgb(248, 179, 179); } #box4 { background-color: rgb(192, 161, 246); } .tile { width: 50%; height: 50%; float: left; } .left { padding: 10px 5px 10px; } .right { padding: 10px 5px 5px; } .box { width: 100%; height: 100%; padding: 20px; background: no-repeat center; background-size: 100% 100%; } #box1 { background-image: url('../a.png'); } #box2 { background-image: url('../b.png'); } #box3 { background-image: url('../c.png'); } #box4 { background-image: url('../d.png'); } Figure 14. Image-based layout on a target device
  • 15. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 15| Page Figure 15. Image-based scaled layout on a 16:9 mobile device
  • 16. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 16| Page 3. Multiple Layout for Devices The first part of the document explained how to develop an application usable in various device categories by taking advantage of the viewport fitting feature provided by platform for a single layout. In many cases, desired end result can be achieved using scaling and a relative layout. However, this approach does not always provide the best quality for the end user. This section describes how you can support the best possible layout and usability with some additional development efforts. For instance, you can create an application which, on a tablet, shows the main information (clock face) while also delivering more meaningful information (calendar), while on a watch device only the main clock face) is displayed. This kind of end result, shown in figure 16, cannot be achieved by only scaling up the whole layout of the watch device. Figure 16. Application for a watch and tablet W3C CSS3 Media Queries already support the majority of techniques needed to provide category-based layouts. This section you learn in detail how to support the optimal layout using CSS techniques. The difference from the single layout case example is that content width of viewport set to “device-width”. This sets the layout viewport width to ideal width. Setting “device-width” tells the Web engine that the application adapts to the device width. In short, “device-width” setting is needed to create an adaptive and responsive Web application. To use the tag in an HTML file, set its name and content: <meta name="viewport" content="width=device-width, user-scalable=no" /> When creating multiple layouts, you must first configure the layout categories. In other words, a classifying category is needed for layout fitting on the current executable environment. Media queries are supported in CSS3 to give Web application information to the executable environment. Viewport Setting for Multiple Layouts Category Classification
  • 17. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 17| Page W3C Media Queries Media queries consist of a media type and expressions features. The media types indicate the on which current Web application is running. They are defined in HTML4. The complete list of media types is: ‘aural’, braille’, handheld’, print’, projection’, screen’, tty’, and tv’. You can declare that sections apply to certain media types inside a CSS style sheet. As in the following example, you can declare “screen” as a media type and describe its layout inside {…}. That code applies the {…} when Web application is run on the executable context screen type. @media screen { ... }
  • 18. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 18| Page Several media queries can be combined in a media query list to configure the executable environment. The following example shows a case in which the Web application runs on executable environment having “screen” media type and a 500 pixel minimum width. Its final view shows the layout inside {..} to the end user. @media screen and (min-width:500px) { ... } Table 1 lists the CSS media features, which you can use to specify layout utilizing queries. Table 1. Media features Feature Value Min/Max Description color integer yes Number of bits per a color component color-index integer yes Number of entries in the color lookup table device-aspect-ratio integer/integer yes Aspect ratio device-height length yes Output device height device-width length yes Output device width grid integer no Set to true for a grid-based device height length yes Rendering surface height monochrome integer yes Number of bits per pixel in a monochrome frame buffer resolution resolution ("dpi" or "dpcm") yes Resolution scan "progressive" or interlaced" no Scanning process of the "tv" media types width length yes Rendering surface width As shown above, media features can be combined when a detailed layout configuration is needed. You can configure the device landscape and portrait mode using “device-aspect-ratio” in W3C Media Queries. This approach is already commonly used in creating mobile Web applications. The following example shows how the max-device-aspect-ratio feature is used. If you use the orientation:portrait/landscape feature, layout can change unexpectedly when virtual keypad is displayed. To avoid the problem, use device-aspect-ratio to configure the portrait and landscape mode. @media screen and (max-width: 320px) and (max-device-aspect-ratio: 1/1) { // For portrait mode } @media screen and (max-width: 640px) and (min-device-aspect-ratio: 11/10) { Classification for Display Mode (Landscape and Portrait)
  • 19. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 19| Page // For landscape mode }
  • 20. How to design apps on Tizen Wearable devices with multi-resolution Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause. For details, see the Content License. . 20| Page 4. Summary This document offered some important tips for developers to compose a Web application UI layout that performs on multiple devices. At the beginning, it described how you can create 1 application layout that works in all devices. In the second half, showed how to create multiple layouts for devices using CSS media queries. The document also provided full HTML/CSS samples that allow you to “copy and paste” the code test how it works on Tizen.