开发者

How To SetFieldChangeListener for ListField in Blackberry?

I am new For Blackberry .. i need some Help. How To SetFieldChangeListener for 开发者_StackOverflowListField in Blackberry?


This way:

yourListField.setChangeListener(fieldChangeListenerInterfaceImplementation);

Implement FieldChangeListener and pass the implementation instance to setChangeListener();


listField = new ListField() {
        protected boolean invokeAction(int action) {
        UiApplication.getUiApplication().invokeLater(new Runnable() {
           public void run() {

                    <** apply your code here **>                    

                    }
                });
                return true;
            };

            public void focusChangeNotify(int index) {
                mainlist = listField.getSelectedIndex();
                listField.invalidate();
                super.focusChangeNotify(index);
            };

            protected void onUnfocus() {
                mainlistflag = true;
                listField.invalidate();
                super.onUnfocus();
            };

            protected void onFocus(int direction) {

                mainlistflag = false;
                super.onFocus(direction);

            };
        };
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜