开发者

Popup screen scrolling issue in manager (Blackberry)

I am trying to implement a popup screen(basically for EULA screen) which has one Manager(Vertical), one RichTextField and one Button. I want the eula text to be displayed in the manager and only manager should have the scrolling not popup screen and button to be added after manager.

problem: If text in RichTextField is small, then i can see the text and button. But if Text is very long the manager scrolls little bit and not able t开发者_运维技巧o see the button at all.

Here is what I've done:

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);

    }
}

Need help on this.


It's because the delegate manager (the first VerticalFieldManager) is not scrollable. It'll never shift its viewport to show your ButtonField.

Have you tried eliminating mainContainer and just adding your RichTextField directly to the popup screen?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜