BlackBerry 应用程序中的工具栏或图标栏

发布于 2024-10-07 18:23:48 字数 114 浏览 0 评论 0原文

我正在为 BlackBerry 9300、9700 和 Storm 实现一个应用程序。在此应用程序中,我需要创建一个类似于 Facebook 应用程序的全局工具栏或图标栏。请建议我如何创建这种类型的图标栏或工具栏。

I am implementing an application for BlackBerry 9300, 9700 and storm. In this application I need to create a global toolbar or iconbar similar to the Facebook application. Please suggest how I can create this type of icon bar or tool bar.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

开始看清了 2024-10-14 18:23:48

你可以使用ToolbarManager在黑莓中实现工具栏,我可以给你一个小例子:

Bitmap _bit = Bitmap.getBitmapResource("abc.png");
Image _bitI = ImageFactory.createImage(_bit);
ToolbarManager _tool = new ToolbarManager();
ToolbarButtonField _next = new ToolbarButtonField(_bitI,new StringProvider("Next"));
_tool.add(_next);
this.add(_tool)

_next.setCommand(new Command(new CommandHandler(){

  public void execute(ReadOnlyCommandMetadata metadata, Object context){
   \\Do what you want on click of this ToolbarButtonField
}
}));

你可以创建任意数量的ToolbarButtonFields,你需要做的就是将这些ToolbarButtonFields添加到ToolbarManager中。

you can use ToolbarManager to implement toolbar in blackberry,i can give u a little Example:

Bitmap _bit = Bitmap.getBitmapResource("abc.png");
Image _bitI = ImageFactory.createImage(_bit);
ToolbarManager _tool = new ToolbarManager();
ToolbarButtonField _next = new ToolbarButtonField(_bitI,new StringProvider("Next"));
_tool.add(_next);
this.add(_tool)

_next.setCommand(new Command(new CommandHandler(){

  public void execute(ReadOnlyCommandMetadata metadata, Object context){
   \\Do what you want on click of this ToolbarButtonField
}
}));

you can create as many ToolbarButtonFields as u want , just what u need to do is add those ToolbarButtonFields to ToolbarManager.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文