2011-01-13 60 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添加到彈出屏幕?