2011-01-13 91 views
0

我想实现一个管理器(垂直),一个RichTextField和一个按钮的弹出屏幕(基本上为EULA屏幕)。我希望eula文本显示在管理器中,只有管理员应该有滚动而不是弹出屏幕和按钮来添加管理器之后。管理器(黑莓)弹出屏幕滚动问题

问题:如果RichTextField中的文本很小,那么我可以看到文本和按钮。但是,如果文本很长,经理就会滚动一下,而且根本看不到按钮。

这里是我做了什么:

class ApplicationEulaScreen extends PopupScreen implements FieldChangeListener 
{ 
    private VerticalFieldManager mainContainer; 
    private RichTextField eulaText; 
    private ButtonField okButton; 

    ApplicationEulaScreen() 
    { 
     super(new VerticalFieldManager(VerticalFieldManager.NO_VERTICAL_SCROLL); 

     mainContainer = new VerticalFieldManager(VerticalFieldManager.VERTICAL_SCROLL | VERTICAL_SCROLLBAR | USE_ALL_HEIGHT); 

     eulaText = new RichTextField("Indicates whether network connectivity is possible. " 
     +"A network is unavailable when a persistent or semi-persistent condition prevents the possibility of connecting to that network. Examples include " 
     +"* The device is out of the coverage area for any network of this type. " 
     +"* The device is on a network other than the home network (i.e., roaming), and data roaming has been disabled. " 
     +"* The device's radio is turned off, e.g., because airplane mode is enabled. ", RichTextField.READONLY | RichTextField.USE_TEXT_WIDTH); 

     okButton = new ButtonField("Ok", ButtonField.FIELD_HCENTER | FOCUSABLE | ButtonField.CONSUME_CLICK); 
     okButton.setChangeListener(this); 

     mainContainer.add(eulaText); 
     add(okButton); 

    } 
} 

需要帮助的这一点。

+0

你能告诉你在哪个模拟器或设备上进行测试吗? – Swati 2011-01-14 04:47:20

+0

这个问题几乎在所有的模拟器中进行,正如我在9700,9000,9550上测试的那样。未在设备上测试 – amsiddh 2011-01-14 08:16:29

回答

0

这是因为委托管理器(第一个VerticalFieldManager)不可滚动。它永远不会移动它的视口来显示你的ButtonField。

您是否尝试过消除mainContainer并直接将RichTextField添加到弹出屏幕?