How to make pull to refresh work?

24 views
Skip to first unread message

Gareth Murfin

unread,
Nov 10, 2016, 9:24:54 PM11/10/16
to CodenameOne Discussions
  f.getContentPane().addPullToRefresh(new Runnable() {

        public void run() {
            _("PULLED.");
            String count = " " + f.getContentPane().getComponentCount();
            f.addComponent(0, new Button("Button " + count));
            f.invalidate();
        }
    });

this doesnt seem to result in anything at all, has it changed?

Also would it be possible to change the text "pull to refresh" to use for other things?

Shai Almog

unread,
Nov 11, 2016, 12:40:28 AM11/11/16
to CodenameOne Discussions
Pull to refresh will only work on a scrollable container. Do you have a standard layout in the content pane?

Gareth Murfin

unread,
Nov 15, 2016, 7:40:57 PM11/15/16
to CodenameOne Discussions
Got it thanks, that is COOL AS HELL.. I recall spending a serious amount of time trying to get this going on android in the past.
Reply all
Reply to author
Forward
0 new messages