tizbn
tizbn

Reputation: 1907

add pull2refresh to tabs in codenameone

i have added the following codes for pull2refresh but the run method is not called. I have tested for form and its ok for form. How to make it workable for tabs so that I can update all tab at once . and I have pull2refresh of form for whole for refresh.

findTabs1(f).getContentPane().addPullToRefresh(new Runnable() {
        @Override
        public void run() {
           // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
          //
        }
    });

Upvotes: 2

Views: 84

Answers (1)

Diamond
Diamond

Reputation: 7483

Tab doesn't have contentPane but TabbedPane.

To add pullToRefresh to a tab, you should add it to the container you added to the tab and it must be scrollable-Y.

Instead of findTabs1(f).getContentPane().addPullToRefresh do findMyContainerInsideTab().addPullToRefresh

Upvotes: 1

Related Questions