小智 5
好吧,如果你只想要快速和肮脏的东西,这应该做的工作:
LabelField lField = new LabelField("text")
{
protected void layout(int width, int height) {
super.layout(width, height);
this.setExtent(HARD_CODED_WIDTH, this.getHeight());
}
};
Run Code Online (Sandbox Code Playgroud)
但正确的方法是选择(或编写)一个布局管理器,它可以根据不同的屏幕尺寸和其他内容灵活地执行您想要的操作.在编写自己的经理时,RIM有一些不错的样本.搜索JustifiedEvenlySpacedHorizontalFieldManager.或者看看黑莓的想法:http://www.thinkingblackberry.com/archives/116
| 归档时间: |
|
| 查看次数: |
3933 次 |
| 最近记录: |