SAPUI5教程——Content Densities
来源:互联网 发布:ajaxupload.js cdn 编辑:程序博客网 时间:2024/05/21 17:40
The devices used to run apps that are developed with SAPUI5 run on various different operating systems and have very different screen sizes. SAPUI5 contains different content densities for certain controls that allow your app to adapt to the device in question, allowing you to display larger controls for touch-enabled devices and a smaller, more compact design for devices that are operated by mouse.
The table below shows the content densities that are available for the Belize, Blue Crystal, and High-Contrast Black (HCB) themes:
Content Density
CSS Class
Explanation
Cozy
sapUiSizeCozy
'Large' design: Dimensions of the controls are optimized for touch-enabled devices, such as smartphones, to allow users to interact with controls more easily.
This is the default density for most controls, particularly those in the sap.m library.
Compact
sapUiSizeCompact
Reduced-size design: The font size is the same as for the cozy density, but the dimensions of the controls and the spacing between them are reduced. This density is more suitable for mouse-operated devices, such as desktops.
For some controls, this is the default density.
Condensed
sapUiSizeCondensed
Size even further reduced compared to Compact (in particular, row heights smaller).
This density can be used for all tables of the sap.ui.table library.
The following two screenshots show the difference between the Cozy and Compact densities, using a simple sap.ui.table.Table example:
If you need to know which content densities are supported for a particular control, the best place to look is the Explored application included as part of the Demo Kit. After choosing a control from the list, look at the details in the Object Header area to see which density is supported. In the example shown below, the control supports both the Compact and Cozy content densities:
Alternatively, you can also use the filter function in the Explored application to filter the controls according to their content densities. Simply choose the filter selection icon in the upper left corner of the screen and then select Content Density, as shown below:
Be aware that you can only set one density within a hierarchy: Once you have set a CSS class at a high level, such as the one described above, it cascades all the way down, meaning you cannot revoke or overwrite it in the lower levels of your coding.
Thus, when using densities, you cannot mix them: You must not combine Cozy and Compact or Cozy and Condensed within the same hierarchy.
Cozy
Make sure you always only use the Cozy density within a hierarchy.
Compact
Make sure you always only use the Compact density within a hierarchy.
Condensed
Condensed is a special case and can only be used in combination with the Compact density.
Also, keep in mind that the Condensed density has an effect on controls in the sap.ui.table library and their content only. If the density is set for controls outside of these tables, it will not have any effect on them.
- SAPUI5教程——Content Densities
- SAPUI5教程——查看系统安装的SAPUI5版本
- SAPUI5教程——ActionSheet的应用
- SAPUI5教程——MaskInput的妙用
- SAPUI5教程——框架简介以及应用实践
- SAPUI5教程——SAP WEB IDE崩溃
- SAPUI5教程——清除SAP Fiori服务缓存
- SAPUI5教程—— Link的基本用法
- SAPUI5教程——更改ODataModel默认的请求方式
- SAPUI5教程——安装Hybrid Application Tools失败
- SAPUI5教程——URLHelper的使用技巧
- SAPUI5教程——MessageStrip的应用场景
- SAPUI5教程——Aggregation Binding的应用
- SAPUI5教程——最全中文学习指南(必看)
- 支持不同屏幕密度——Supporting Different Densities
- SAPUI5教程——SAP Fiori应用类型分析(Transactional, Fact Sheets, Analytical)
- SAPUI5教程——ABAP环境下SAP Fiori 系统搭建以及开发实践
- SAPUI5教程——can not load launchpad Tile问题解决方案
- Android 软键盘事件imeOptions响应
- Java集合框架
- seo教程:网站SEO优化的七大基本要点!
- 设置input 的 checkbox样式
- java.text.ParseException: Unparseable date:
- SAPUI5教程——Content Densities
- NOIP 2015 提高组 day2 解题报告
- 提升HBase写性能
- #1 定义组件
- onEditorAction不执行
- NXP JCOP系列芯片卡特点
- 二叉树基本算法
- 【LeetCode】16. 3Sum Closest
- Mysql技术内幕InnoDB存储引擎读书笔记--《六》锁