Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Blackberry 黑莓垂直滚动,用于并排垂直管理器_Blackberry - Fatal编程技术网

Blackberry 黑莓垂直滚动,用于并排垂直管理器

Blackberry 黑莓垂直滚动,用于并排垂直管理器,blackberry,Blackberry,我必须为Blackberry JRE 4.6及以上版本构建此UI。 请建议此UI的方法 我解决了这个问题,这里是方法 以水平管理器作为标题 HorizontalFieldManager nonscrollableHFM=新的HorizontalFieldManager() 将另一个水平管理器作为容器 HorizontalFieldManager containerHfm=新的HorizontalFieldManager() 2.1为左侧部分添加垂直管理器(不可滚动) VerticalFieldM

我必须为Blackberry JRE 4.6及以上版本构建此UI。 请建议此UI的方法


我解决了这个问题,这里是方法

  • 以水平管理器作为标题

    HorizontalFieldManager nonscrollableHFM=新的HorizontalFieldManager()

  • 将另一个水平管理器作为容器

    HorizontalFieldManager containerHfm=新的HorizontalFieldManager()

    2.1为左侧部分添加垂直管理器(不可滚动)

    VerticalFieldManager leftVfm=新的VerticalFieldManager()

    2.2为右部分创建自定义垂直管理器,如下所示

  • {

    }

  • 通过调用setHeight和setWidth方法调整右垂直线管理器的高度和宽度

    我从这里得到了帮助,


  • Stack Overflow并不是一个合适的地方,比如“有人能帮我做我的工作吗?”如果你展示你已经做了哪些工作,并询问关于你被卡住的地方的具体问题,你会得到更好的回答。
       class RightVfm extends VerticalFieldManager {
    
      RightVfm() {
    
        super(VERTICAL_SCROLL | VERTICAL_SCROLLBAR | NO_HORIZONTAL_SCROLL
        | NO_HORIZONTAL_SCROLLBAR | USE_ALL_WIDTH);
    
          }
    
      protected void sublayout(int width, int height) {
    
          super.sublayout(width, getPreferredHeight());
    
          setExtent(width, getPreferredHeight());
    
      }
    
      public int getPreferredWidth() {
    
         return _width;
    
      }
    
    public void setWidth(int w) {
    
                _width = w;
    
            }
    
    public int getPreferredHeight() {
    
                return _height;
    
            }
    
    public void setHeight(int h) {
    
                _height = h;
    
            }
    
        private int _width;
        private int _height;
    
    };