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

Native Development

Reply
Developer
Posts: 126
Registered: ‎06-25-2013
My Device: Z10
My Carrier: none
Accepted Solution

How to disable a scrollview for opening a camera

Hi,

 

I have a requirement for opening a camera from html page in webview. The webview is in scroll mode so camera is not accessible. Is there any way to disable scrollView to open the camera. 

 

Regards,

Developer
Posts: 828
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Rogers

Re: How to disable a scrollview for opening a camera

[ Edited ]

setting scroll mode to none 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 you could do is, create the webview and then put a scrollview in it only scrolling the content you need.  leave the camera object outside of the scrollview

Highlighted
Developer
Posts: 126
Registered: ‎06-25-2013
My Device: Z10
My Carrier: none

Re: How to disable a scrollview for opening a camera

[ Edited ]

I thought the same way to put camera object outside the scrollview.

 

And it worked