- Sencha Touch 教程
- Sencha Touch - 主页
- Sencha Touch - 概述
- Sencha Touch - 环境
- Sencha Touch - 命名约定
- Sencha Touch - 架构
- Sencha Touch - MVC 说明
- Sencha Touch - 第一个应用
- Sencha Touch - 构建应用程序
- Sencha Touch - 迁移步骤
- Sencha Touch - 核心概念
- Sencha Touch - 数据
- Sencha Touch - 主题
- Sencha Touch - 设备配置文件
- Sencha Touch - 依赖关系
- 环境检测
- Sencha Touch - 事件
- Sencha Touch - 布局
- Sencha Touch - 历史和支持
- Sencha Touch - 上传和下载
- Sencha Touch - 视图组件
- Sencha Touch - 打包
- Sencha Touch - 最佳实践
- Sencha Touch 有用资源
- Sencha Touch - 快速指南
- Sencha Touch - 有用资源
- Sencha Touch - 讨论
Sencha Touch - BlackBerry 支持
Sencha Touch 2.x 为 BlackBerry 10 提供特定主题和功能。
Sencha Touch 不仅支持 Blackberry,还提供 BlackBerry 10 图标,确保设备具有 BlackBerry 的外观和感觉。
将 BlackBerry 主题添加到 app.json
以下示例演示如何将 BlackBerry 主题添加到 app.json。
"css": [
{
"path": "touch/resources/css/bb10.css",
"platform": ["chrome", "safari", "ios", "android", "blackberry", "firefox", "ie10"],
"theme": "Blackberry",
"update": "delta"
}
]
添加 BlackBerry 图标
Sencha Touch 为 BlackBerry 主题提供了 50 多个图标,因此应用程序提供了更好的外观和感觉。下载并解压 Sencha Touch 软件安装后,可以在 Sencha Touch /resources/themes/images/bb10/icons 目录中找到图标。
在应用程序中使用图标之前,将这些图标编译到 app.scss 文件中。SCSS 文件位于 Sencha Touch 安装目录的 resources/sass 目录中。将要使用的图像添加到 app.scss 文件,并使用 Compass 编译文件并生成 app.css 文件。Compass 与 Sencha CMD 捆绑在一起。
现在要使用图标,可以直接通过 iconCls 属性使用图标。
iconCls: 'overflow_tab'
Sencha Touch 拥有针对 BlackBerry 特有的新动作栏菜单。
将 BlackBerry 动作菜单添加到动作栏
<!DOCTYPE html>
<html>
<head>
<link href="https://cdn.sencha.com/touch/sencha-touch-2.4.2/resources/css/sencha-touch.css" rel="stylesheet" />
<script type="text/javascript" src="https://cdn.sencha.com/touch/sencha-touch-2.4.2/sencha-touch-all.js"></script>
<script type="text/javascript">
Ext.application({
name: 'Sencha',
launch: function() {
// Tab menu button
var tabMenuButton = Ext.create('Ext.ux.TabMenuButton', {
text: 'All',
docked: 'left',
iconCls: 'view_grid',
menuItems: [
{
text: 'All',
iconCls: 'view_grid'
}, {
text: 'Favorites',
iconCls: 'done'
}, {
text: 'Messenger',
iconCls: 'bbm'
}
]
});
// Add it to the action bar
Ext.Viewport.add({
layout: 'card',
items: [
{
xtype: 'toolbar',
docked: 'bottom',
items: [tabMenuButton]
}
]
});
}
});
</script>
</head>
<body>
</body>
</html>
将产生以下结果 −
sencha_touch_core_concepts.htm
广告