AtEnd ScrollView

Hi, I would like to know when the user reach the end of a ScrollView.

In a ListView control, we use ListScrollStateHandler to treat onAtEndChanged, is there a way to achieve this whitin a ScrollView?

Thanks in advance

I figured out that viewableArea and included content height compare ScrollView

Tags: BlackBerry Developers

Similar Questions

  • My request is not getting screolled or slide down. Please keep scrollview so that the user can scroll upwards and downwards and view the content.

    My request is not getting screolled or slide down. Please keep scrollview so that the user can scroll upwards and downwards and view the content

    Here is my code that need to be kept scrollview

    
    http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
    
        
    
            
    
                
    
                
                
    
                
    
                    
    
                        
    
                        
                    
    
                    
    
                        
    
                        
                        
                    
    
                    
    
                
    
                
    
                    
                
            
        
    
    
    

    I just need the view scrollbar or scroll with which users users can scroll vertically in the App and can see full

    content of the app.

    Solved

  • How to insert ScrollView

    But no letter or content that is not show me.

    I want that top screen touch down... Please help me...

    import bb.cascades 1.2
    
    Sheet {
        id: sheetSection
        property string myTitle
    
        Page {
            id: pageSection
    
            titleBar: TitleBar {
                title: qsTr("Acerca de")
                id: titleSection
    
                acceptAction: ActionItem {
                    title: "Cerrar"
                    onTriggered: {
                        sheetSection.close();
                    }
                }
            }
    
            Container {
                id: contSection
                Label {
                    text: qsTr("TiTanTenBerry")
                    horizontalAlignment: HorizontalAlignment.Center
                    textStyle.color: Color.DarkBlue
                    textStyle.fontWeight: FontWeight.W600
                    textStyle.base: SystemDefaults.TextStyles.BigText
                }
    
                ImageView {
                    imageSource: "asset:///images/info.png"
                    horizontalAlignment: HorizontalAlignment.Center
                }
                Label {
                    text: qsTr("Encontraras la mejor informacion")
                    horizontalAlignment: HorizontalAlignment.Center
                }
                Label {
                    text: qsTr("Aplicaciones, Juegos, Temas, Actualidad...")
                    horizontalAlignment: HorizontalAlignment.Center
                }
                Label {
                    text: qsTr("Todo sobre tu BlackBerry® \n Visita nuestro Blog "aqui la web")
                    horizontalAlignment: HorizontalAlignment.Center
                    multiline: true
                    textFit.mode: LabelTextFitMode.Default
                    textStyle.textAlign: TextAlign.Center
                }
    
            } //contSection
    
        } //pageSection
    
    } //sheetSection
    

    Not raise or lower... I want the screen to scroll up and down

    If you wish that the capacities of zooming and scrolling, you must use the ScrollView control.

    https://developer.BlackBerry.com/native/reference/Cascades/bb__cascades__scrollview.html

    Page{
     ScrollView {
       Container {
         //your ui elements
       }
     }
    }
    
  • Add a dynamic control to scrollView in QML

    How can I add a container (random) ScrollView number. QML, javascript function cannot init a QML inside object. ? Please answer

    You need ComponentDefinition

    attachedObjects: [
     ComponentDefinition {
         id: itemDefinition
         MenuItem {
             id: item
         }
     }
    ]
    

    And inserted dynamically

     var tmpList = Array();
     for (var i = 0; i < 8; i ++) {
         var tmp = itemDefinition.createObject();
         tmpList.push(tmp);
    
         tmpList[i].itemLabelText = (i + 1).toString();
         tmpList[i].translationX = getPositionX(i);
         tmpList[i].translationY = getPositionY(i);
         menuContainer.add(tmpList[i]);
     }
     itemsList = tmpList;
    

    Example above maintains the reference to each item in the list, so that you can edit them after. Here is a complete project: http://www.darkenergy.si/circular-menu/

  • Progamatically scroll to the top of a ScrollView

    Is there a way to programatically scroll to the top of a ScrollView? I've seen no good in ScrollView is the 'top' and I would rather do in QML only... thoughts?

    Have you tried scrollToPoint (0, 0, ScrollAnimation.Default)?

  • How to disable a scrollview for opening a camera

    Hello

    I have a requirement for a camera of html page opening in webview. The Web view is scrolling camera mode is not accessible. Is it possible to disable scrollView to open the camera.

    Kind regards

    assign none to the scroll mode should do the trick

    ScrollView {
        id: scrollView
        scrollViewProperties {
            scrollMode: ScrollMode.None
            pinchToZoomEnabled: true
        }
        layoutProperties: StackLayoutProperties { spaceQuota: 1.0 }
    
        Container {
            background: Color.LightGray
    
            WebView {
                id: webViewScrollable
                url: "http://example.com"
    
                onMinContentScaleChanged: {
                    scrollView.scrollViewProperties.minContentScale = minContentScale;
                }
    
                onMaxContentScaleChanged: {
                    scrollView.scrollViewProperties.maxContentScale = maxContentScale;
                }
            }
        }
    }
    

    What could you do, create the view Web and then put a scrollview inside just scrolling through the content you need.  Let the object of the camera outside the scrollview

  • ScrollView Center vertically

    import bb.cascades 1.0
    Page {
        Container {
            background: style.bgColor
            Container {
    
                preferredWidth: Infinity
                background: style.black
                TopBar {
                    id: bar
                    layoutProperties: StackLayoutProperties {
                        spaceQuota: -1
                    }
                }
                layoutProperties: StackLayoutProperties {
                    spaceQuota: -1
                }
            }
            ScrollView {
                id: scrollView
                verticalAlignment: VerticalAlignment.Center
                Container {
                    leftPadding: 20
                    rightPadding: 20
                    bottomPadding: 20
                    topPadding: 20
                    layout: StackLayout {
                        orientation: LayoutOrientation.TopToBottom
                    }
    
                    TextField {
                        inputMode: TextFieldInputMode.NumbersAndPunctuation
                        hintText: qsTr("accountNumber") + Retranslate.onLocaleOrLanguageChanged
                    }
                    TextField {
                        inputMode: TextFieldInputMode.NumbersAndPunctuation
                        hintText: qsTr("accountNumber") + Retranslate.onLocaleOrLanguageChanged
                    }
                    TextField {
                        inputMode:  TextFieldInputMode.NumbersAndPunctuation
                        hintText: qsTr("customerId") + Retranslate.onLocaleOrLanguageChanged
                    }
                    TextField {
                        inputMode:  TextFieldInputMode.PhoneNumber
                        hintText: qsTr("mobileNumber") + Retranslate.onLocaleOrLanguageChanged
                    }
                    TextField {
                        inputMode:  TextFieldInputMode.Text
                        hintText: qsTr("dateOfBirth") + Retranslate.onLocaleOrLanguageChanged
                    }
                    TextField {
                        inputMode: TextFieldInputMode.Text
                        hintText: qsTr("userName") + Retranslate.onLocaleOrLanguageChanged
                    }
                    Button {
                        text: qsTr("submit") + Retranslate.onLocaleOrLanguageChanged
                        preferredWidth: Infinity
                        onClicked: {
                            alkhaliji.login();
                        }
                    }
    
                }
    
                scrollViewProperties {
                    scrollMode: ScrollMode.Vertical
                }
            }
        }
    }
    

    I have this form, which the user must fill. My problem here is I want the scrollview in the middle of the screen.

    Q10, it makes no difference there top and padding 20. But the z10 since the screen is large, it takes top padding low 20.but padding it takes the entire bottom of the screen. I won't be centered vertically in z10.

    Solved this way

     Container {
                layout: DockLayout {
    
                }
    
            ScrollView {
                id: scrollView 
    
                verticalAlignment: VerticalAlignment.Center
    
  • WebView in ScrollView zoomed in policy number

    Hey all.

    When I put a webview in a scrollview and have pinch zoom active, by zooming in on the content translated by extremely fragmented and out of the text development. The text does not refocus when you zoom in or zoom out as it does in the browser of the phone.

    How can I enable the same behavior that is on the default browser, inside a webview? I couldn't find anything in WebSettings that goal, although I could have missed something.

    Hi Brennan12325, this problem no longer exists on the OS Version 10.1.0. See the screenshots for your referenct:

  • Key capture within a ScrollView

    I have a check that when I get a touch, I followed the touch() signal when the user moves upwards and downwards, to change the value there is a. Like in this video https://www.youtube.com/watch?v=aK0Mqxg89xc , but in the vertical direction.

    If I put the control inside a ScrollView, control no longer works, because I get a TouchEvent Cancel.

    I tried to change all the ancestors of TouchPropagationMode view touchPropagationMode:assThrough button down event and bring back them into the contact upwards / button cancel event (so the ScrollView should stop running events for the scrollbar, when this control has captured the touch event), but it does not work, and I keep getting the Cancel event.

    I also had a look at this thread http://supportforums.blackberry.com/t5/Cascades-Development/block-scroll-view/td-p/2029435 , that he says makes the turn of events, but I don't understand leave a control within the view, but from the outside.

    No hint of how to capture key events and prevent the ScrollView parent of during my control is the capture of the touch event!

    Finally found a way to solve this problem. Sorry for the 'spam' in the forum :/

    The path is the same used in the post I mentioned in my first post.

    I put a signal handler for my touch event.

    QObject::connect( counterLabel, SIGNAL( touch(bb::cascades::TouchEvent*) ),
                          this, SLOT( onTouchEvent( bb::cascades::TouchEvent* )));
    

    So when I get a touch down in my counterLabel, I call the hijackTouchEvents:

    void TouchCounter::onTouchEvent( bb::cascades::TouchEvent* touchEvent )
    {
        TouchType::Type eType = touchEvent->touchType();
    
        if( eType == TouchType::Down ){
            counterUpdateTimer->start();
            initialY = touchEvent->windowY();
            counterUpdateIncrement = 0;
            timerIntervalAccum = 0;
            hijackTouchEvents();
            touchEvent->accept();
        }
    }
    

    and I get the "oldest ancestor" to install a touchCapture Manager and block all events key to its immediate children (save mode to restore them later).

    void TouchCounter::hijackTouchEvents()
    {
        blockedNode = NULL;
        capturingTouchesNode = this;
        VisualNode* next;
        while( (next = qobject_cast(capturingTouchesNode->parent() ) ) != 0){
            blockedNode = capturingTouchesNode;
            capturingTouchesNode = next;
        }
        QObject::connect( capturingTouchesNode, SIGNAL( touchCapture(bb::cascades::TouchEvent*) ),
                              this, SLOT( onTouchCaptureEvent( bb::cascades::TouchEvent* )));
        if( blockedNode != NULL ){
            blockedNodeOriginalPropagationMode = blockedNode->touchPropagationMode();
            blockedNode->setTouchPropagationMode( TouchPropagationMode::None);
        }
    }
    

    I also have the function to disconnect from the touchCapture:

    
    void TouchCounter::freeTouchEvents()
    {
        QObject::disconnect( capturingTouchesNode, SIGNAL(  touchCapture(bb::cascades::TouchEvent*) ),
                                  this, SLOT( onTouchCaptureEvent( bb::cascades::TouchEvent* )));
        capturingTouchesNode = 0;
    
        if( blockedNode != NULL){
            blockedNode->setTouchPropagationMode( blockedNodeOriginalPropagationMode );
            blockedNode = NULL;
        }
    }
    

    And I call the freeTouchEvents function in the onTouchCaptureEvent, when I get a touch up or touch cancel event.

    
    void TouchCounter::onTouchCaptureEvent( bb::cascades::TouchEvent* touchEvent )
    {
        TouchType::Type eType = touchEvent->touchType();
        VisualNode* tgt = touchEvent->target();
        touchEvent->propagationPhase();
        if( eType == TouchType::Move && capturingTouchesNode != 0 ){
            float a = touchEvent->windowY();
            float diff = a - initialY;
            counterUpdateIncrement = getUpdateRateMilliseconds( diff  );
            if( diff > 10.0f ){
                valueDirection = -1;
            }else if( diff < 10.0f ){
                valueDirection = 1;
            }else{
                valueDirection = 0;
            }
            touchEvent->accept();
        }else if( eType== TouchType::Up || eType == TouchType::Cancel ){
            initialY = 0;
            counterUpdateTimer->stop();
            touchEvent->accept();
            freeTouchEvents();
        }
    }
    

    I hope this is help someone!

  • How to disable scrollview

    I have a list.xml he has 6 points and does not need to scroll upwards or downwards.

    How can I disable scrollview. See below the code nothing eles on my page a scrollview

    ListView {
                    id: listView
                    // set object name to let listView to be discoverable from C++
                    objectName: "listView"
                    layout: GridListLayout {
                        cellAspectRatio: 0.79
                        orientation: LayoutOrientation.BottomToTop
                        }
                        dataModel: XmlDataModel {
                            source: "models/items.xml"
                        }
                        listItemComponents: [
                            // define component which will represent list item GUI appearence
                            ListItemComponent {
                                type: "item"
                                // list item GUI appearence component is defined in external MyListItem.qml file
                                WebItem {
                                }
                            }
                        ]
    

    Thanks in advance.

    In this case, why are you even using a list or grid? If you don't want the advantage of the scroll at any time, do not use them at all... Don't you extend the components in a different way?

  • ImageView ScrollView scaling

    Hi all, my picture is much bigger than the size of the screen and is the scale good onPinchUpdated signal (), but after that it's normal size. How correct scale in the ScrollView? Because without ScrollView, it works fine. Here is my code:

    ScrollView {
      id: myScroll
      ImageView {
        id: myImage
        property double initialScale: 1.0
        property double scaleFactor: 0.8
        imageSource: "asset:///images/bigpic.jpg"
        gestureHandlers: [
          PinchHandler {
            onPinchUpdated: {
              myImage.scaleX = myImage.initialScale + ((event.pinchRatio - 1) * myImage.scaleFactor);
              myImage.scaleY = myImage.initialScale + ((event.pinchRatio - 1) * myImage.scaleFactor);
             }
          }
        ]
      }
      scrollViewProperties {
          ScrollMode: ScrollMode.Both
      }
    }
    

    You can use the pinchToZoomEnabled property... and let the scaling to the BONE

     ScrollView {
                scrollViewProperties {
                    scrollMode: ScrollMode.Both
                    pinchToZoomEnabled: true
    
                }
    
    .........................
    
    }
    
  • How ScrollView + gestureHandler (pinch) work together?

    I'm need ScrollView + gestureHandler (pinch) to large image scaling.

    If I use:

    Container {
        ScrollView {
            gestureHandlers: [
                PinchHandler {
                    // scaling code here
                }
            ]
        }
    }
    

    It does not together (ScrollView simply handle scroll events, but other gistureHandler do not work)

    I found the solution.

  • ScrollView do not scroll

    Hi all

    Anyone can point out what I'm doing wrong...

    ScrollView {
                            scrollViewProperties.scrollMode: ScrollMode.Vertical
                            scrollViewProperties.initialScalingMethod: ScalingMethod.Fill
                            layoutProperties: AbsoluteLayoutProperties {
                                positionY: 187.0
                            }
                            scrollViewProperties.overScrollEffectMode: OverScrollEffectMode.OnScroll
                            touchPropagationMode: TouchPropagationMode.Full
                            overlapTouchPolicy: OverlapTouchPolicy.Deny
                            Container {
                                Container {
                                    id: mContainer
                                    ImageView {
                                        imageSource: "asset:///images/m.png"
                                    }
                                }
                                Container {
                                    id: pContainer
                                    ImageView {
                                        imageSource: "asset:///images/p.png"
                                    }
                                }
                            }
                        }
    

    Thank you

    The problem is the tank this ScrollView contained in. Put a ScrollView within a DispositionAbsolue can cause the behavior you're seeing.

    If you can paste code that contains your code above, which may help us to help you.

  • Hide the Scrollbar in ScrollView

    Hi all

    is it possible to hide the scroll bar in a scrollview?

    Kind regards.

    You expect that there is a property as https://developer.blackberry.com/cascades/reference/bb__cascades__listview.html#scrollindicatormode in the ListView, but it seems that they who left on Beta 3 so for now, in my view, there is no way to do it. A new update is scheduled for late November, so with a bit of luck we will see it then.

    If you really want to maximize the chances that this situation is treated, create a feature request in Jira incident manager. See link to developer Issue Tracker at the bottom of http://developer.blackberry.com

  • Can anyone tell my why my scrollview and pinch and zoom don't work... the webview load very well...

    ActionItem {
                        onTriggered: {
                            var pageWebPage = visitWebPage.createObject();
                            favoritesPageNavPane.push(pageWebPage);
                        }
                        imageSource: "asset:///icons/134.%20Crystal%20ball.png"
                            ActionBar.placement: ActionBarPlacement.OnBar
                        },
    
    .......
    
    ComponentDefinition{
                id: visitWebPage
                Page{
                    property alias webView: webView
                    Container {
                        ScrollView {
                        scrollViewProperties.pinchToZoomEnabled: true
                        scrollViewProperties.scrollMode: ScrollMode.Both
                            WebView {
                                id: webView
                                url: "http://www.bing.com"
    
                            }
                        }
                    }
                }
            },
    

    Hello

    in fact it was working properly, I pushed the incorrect action button to test .

    Its been a long night...

    Thank you..

Maybe you are looking for

  • Photos vs iPhoto?

    For me, I want my iPhoto as the new Photo program more like a Windows program. < published by host >

  • Mobile Intel GMA 4500 is good for gaming?

    I have laptop Satellite U400-157, but I think that my video problem with games like 'NBA 2 K 10 pc It is possible to update my Nvidia video card?

  • USB-6009 trigger reference by loops

    Hello I am a student studying for a Beng. As my final project, I want to create a default for electric motors recorder. The basic principle is that he sits and waits for a signal to trigger, how she recorded the analog waves of voltage and current fo

  • Import CSV file in contacts

    I followed the procedure to import contacts in hotmail to the letter, but now I get the same error message "there was a problem importing your contacts, try to re-import: I tried again and again and again, two questions for you: 1, what is the proble

  • Register connections Crash

    my computer will not restore the system settings.  telling me that it failed.  at startup keeps making a physical memory dump error with "connections of the registers.  I can only work in safe mode.  What should do?