Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
ankityadav4u
Posts: 231
Registered: ‎03-16-2011
My Device: 9700, 9550, and JDE
My Carrier: AIRTEL, BSNL

scrolling problem in 7.0

there is scrolling problem in 7.0 os (basically in touch  devise afaik)

 

as per the image #1 is a vfm that scrolls continuously and sets the vertical scroll to provide scroll effect

but when below scrolling manager is virtually at top or at bottom most position (#2 or #3), if i scrolls it beyond that it effects the srolling of #1 manager, it changes the scroll of that vfm. i kept that non-focusable, but still its not working as per requirement.

 

problem.png


available on: Monday to Friday, Indian standard (day) time : )
  • Give kudos by clicking on the star icon to say "Thanks!" if you feel this response is helpful.
  • Click "Accept as Solution" if this post was what you needed. so that people who are trying to help will not waste their time reading a thread where no help is needed.

Please use plain text.
Administrator
MSohm
Posts: 14,450
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: scrolling problem in 7.0

What BlackBerry Smartphone model and BlackBerry device software version are you testing on?  You can find this under Options, About on the BlackBerry Smartphone.

 

Can you provide a code sample?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
ankityadav4u
Posts: 231
Registered: ‎03-16-2011
My Device: 9700, 9550, and JDE
My Carrier: AIRTEL, BSNL

Re: scrolling problem in 7.0

i checked this through 4.6 to 7.0 OS version

problem exist for 6.0 and above

 

while code have large dependencencies, and not allowed by employer's policy.

m just posting related snippets

 

in a HFM i am adding a VFM which is the scroller, in which a method for scrolling,

 

HFM:  USE_ALL_WIDTH | NON_FOCUSABLE

VFM : super(VERTICAL_SCROLL |USE_ALL_WIDTH | NO_HORIZONTAL_SCROLL)

 

in HFM, Bitmap is 1st child, then this scroller VFM

 

public void startUpdateThread() {
        Thread mScrollThread = new Thread() {
            public void run() {
                fetchTickerData();
                int ScrollAmt = 0;
                while (true) {
                    synchronized (UiApplication.getEventLock()) {
                        setVerticalScroll(ScrollAmt++);
                    }
                    if (ScrollAmt >= getVirtualHeight()) {
                        fetchTickerData();
                        ScrollAmt = 0;
                    }
                    try {
                        Thread.sleep(200);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        };
        mScrollThread.start();
    }

 

// follwing method is prototype of actual

private void fetchTickerData() {
        boolean bLiveMatch = false;
       // to check updated source
            synchronized (UiApplication.getEventLock()) {
                deleteAll();
                add(new Lable("\n\n"));
            }
            for (int i = 0; i < 5; i++){

//LabelLine1,2,3
                    LabelLine1.setPadding(2, 0, 0, 0);
                    LabelLine3.setPadding(0, 0, 2, 0);
                    LabelLine3.setBorder(BorderFactory.createSimpleBorder(new XYEdges(0, 0, 1, 0), new XYEdges(0, 0, Color.GRAY, 0), Border.STYLE_SOLID));
                    synchronized (UiApplication.getEventLock()) {
                        add(LabelLine1);
                        add(LabelLine2);
                        add(LabelLine3);
                    }
                  
                }
            }
        
        }
        if (getFieldCount() > 1) {
            synchronized (UiApplication.getEventLock()) {
                add(new Lable("\n\n"));
            }
        }
    }


available on: Monday to Friday, Indian standard (day) time : )
  • Give kudos by clicking on the star icon to say "Thanks!" if you feel this response is helpful.
  • Click "Accept as Solution" if this post was what you needed. so that people who are trying to help will not waste their time reading a thread where no help is needed.

Please use plain text.