在黑莓手机在一个屏幕上两个titile酒吧 [英] Two titile bars on a single screen in BlackBerry

查看:277
本文介绍了在黑莓手机在一个屏幕上两个titile酒吧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立在黑莓的屏幕。在其中应该只有原来的标题栏下第二个标题栏。另外,第二标题栏应该是固定的,它不应该与垂直滚动滚动。

I am trying to build a screen in BlackBerry. In which there should be a second title bar just below the original title bar. Also the second title bar should be fixed and it should not be scrolled with vertical scroll.

在这个问题上需要一些建议。

Need some advice on this issue.

推荐答案

您可以添加第二个冠军,并在<一原标题栏href=\"http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/container/VerticalFieldManager.html\"相对=nofollow> VerticalFieldManager 。然后,只需设置 VerticalFieldManager 标题,因为它可以设置任何字段管理​​实例作为标题。

You can add the second title and the original title bar on a VerticalFieldManager. Then just set that VerticalFieldManager as title, as it's possible to set any Field, Manager instance as title.

检查<一href=\"http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/container/MainScreen.html#setTitle%28net.rim.device.api.ui.Field%29\"相对=nofollow>公共无效的setTitle(场冠军)和下面的例子。

public class DemoScreen extends MainScreen {
    public DemoScreen() {
        super();

        // Prepare a Custom Title
        long style = NO_VERTICAL_SCROLL | NO_VERTICAL_SCROLLBAR | USE_ALL_WIDTH;
        VerticalFieldManager myTitle = new VerticalFieldManager(style);

        // Set background color.
        myTitle.setBackground(BackgroundFactory.createSolidBackground(Color.GRAY));

        // Add any numbers/types of field
        myTitle.add(new LabelField("First line."));
        myTitle.add(new LabelField("The second line."));

        // Set the Title
        setTitle(myTitle);
    }
}

这篇关于在黑莓手机在一个屏幕上两个titile酒吧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆