【发布时间】:2014-01-01 03:32:21
【问题描述】:
我正在尝试将自定义字体嵌入到我的移动应用程序的所有元素中。
只有 Action Bar 和 Buttons 改变了,而 Tabbars 和 ListItems 没有改变。
这是我的 style.css 代码
/* CSS file */
@namespace s "library://ns.adobe.com/flex/spark";
/* StyleableTextField, regular */
@font-face {
src: url("assets/fonts/Roboto-Light.ttf");
fontFamily: "robotoLight";
fontWeight: bold;
embedAsCFF: false;
}
/* Label, regular */
@font-face {
src: url("assets/fonts/Roboto-Light.ttf");
fontFamily: "robotoLightCFF";
fontWeight: normal;
embedAsCFF: true;
}
s|Label {fontFamily: "robotoLightCFF";}
s|ActionBar {fontFamily: "robotoLight";}
s|LabelItemRenderer {fontFamily: "robotoLight";}
s|Button {fontFamily: "robotoLight";}
s|TabbedViewNavigator #tabBar {fontFamily: "robotoLight";}
s|TextInput {fontFamily: "robotoLight";}
s|View {fontFamily: "robotoLight";}
global
{
text-align: left;
content-background-color: #FFFFFF;
content-background-alpha: 0.59;
fontFamily: "robotoLight";
}
/** this is the bar the top of the app **/
s|ActionBar{
chromeColor:#4D99E0; /* more like background color */
titleAlign:center;
textShadowAlpha: 0;
}
/* This is the styling of the tabbed navigator */
s|TabbedViewNavigator #tabBar {
chromeColor: #4D99E0; /* color of background on buttons */
color: #ffffff; /* color of text on tab names */
}
.playButton,.pauseButton,.resumeButton,.initButton {
chromeColor: #4D99E0;
color: #fff;
}
下面是它的屏幕截图: screenshot http://samzkingdom.com/wp-content/uploads/2014/01/Capture.png
我该怎么做?还是我做错了什么?
[编辑]
我刚刚在我的桌面上的模拟器上测试完全是我的错误。它可以在 Android 设备上完美运行。
【问题讨论】:
标签: apache-flex mobile flex4.5 flexbuilder