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
Regular Contributor
asifmunir
Posts: 51
Registered: ‎08-07-2013
My Device: blackberry z10
My Carrier: asif

touch Propagation Mode

i m develop blackberry app.

when list is loading then ActivityIndicator but touch Propagation Mode not None

Please use plain text.
Developer
knobtviker
Posts: 127
Registered: ‎05-31-2013
My Device: BlackBerry Z10 Limited Edition
My Carrier: Bonbon

Re: touch Propagation Mode

Bind the TouchPropagation property to ActivityIndicator running property.

if running then None else Full <-just pseudo code. :smileywink:

Please use plain text.
Regular Contributor
asifmunir
Posts: 51
Registered: ‎08-07-2013
My Device: blackberry z10
My Carrier: asif

Re: touch Propagation Mode

i m trying is method but not working 

any other solution

 

Please use plain text.
Developer
knobtviker
Posts: 127
Registered: ‎05-31-2013
My Device: BlackBerry Z10 Limited Edition
My Carrier: Bonbon

Re: touch Propagation Mode

Can you show this small piece of code that is not working, please? A simple binding of values must always work if done properly.

Please use plain text.
Regular Contributor
asifmunir
Posts: 51
Registered: ‎08-07-2013
My Device: blackberry z10
My Carrier: asif

Re: touch Propagation Mode

import bb.cascades 1.0
import bb.data 1.0
Page {
  Container {
      id: con
      layout: DockLayout {}
        touchPropagationMode: TouchPropagationMode.Full
        
        Container {
            id: listviewPage
            layout: DockLayout {}
            Label {
                id: nocoupons
                text: "No Coupons"
                textStyle.fontWeight: FontWeight.Bold
                visible: false 
                horizontalAlignment: HorizontalAlignment.Center
                verticalAlignment: VerticalAlignment.Center
                textStyle.color: Color.LightGray
            }
            
            ActivityIndicator {
                id: myIndicator12321
                preferredWidth: 200
                preferredHeight: 200
                horizontalAlignment: HorizontalAlignment.Center
                verticalAlignment: VerticalAlignment.Center
                scaleY: 2.3
                scaleX: 2.0
                onStarted: {
                    con.touchPropagationMode.None
                    
                }
                onStopped: {
                    con.touchPropagationMode.Full
                }
            }
            preferredWidth: 768.0
            maxWidth: 768.0
            preferredHeight: 2300
            maxHeight: 2300
            translationY: 10
            ListView {
                id: listvie_cat_coipons
                property variant btnclick:""
                translationY: 00
                dataModel: dataModelList
                listItemComponents: [
                    ListItemComponent {
                        id: cat_container
                        type: "item"  
                       
                        Container {
                        
                        
                        id: checkdata_contanier
                        preferredHeight: 515
                        preferredWidth: 768
                        layout: AbsoluteLayout {
                        
                        }
                        ImageView {
                        id: image_frame
                        imageSource: "asset:///confirm%20order/img-frame.png"
                        preferredWidth: 730
                        translationY: 53
                        translationX: 10
                        preferredHeight: 285
                        }
                        Label {
                        id: lblmsg
                        text: "Image Not Found"
                        translationY: 153
                        translationX: 80
                        textStyle.fontSize: FontSize.XXLarge
                        textStyle.color: Color.White
                        
                        textStyle.fontWeight: FontWeight.Bold
                        }
                      
                       
                        ImageButton {
                        id: view_details_btn
                        preferredHeight: 35
                        preferredWidth: 102
                        translationX: 610
                        translationY: 440
                        defaultImageSource: "asset:///coupon%20list/viewdetail_button.png"
                        }
                        ImageButton {
                        defaultImageSource: "asset:///coupon%20list/allfromsamecompanies.png"
                                translationX: 40
                        translationY: 455
                        preferredHeight: 32
                        preferredWidth: 356
                        }
                        translationY: -40.0
                        }
                    }
                ]
                onTriggered: {
                }
            }
        }
        Container {
            layout: DockLayout {
                
            }
            preferredHeight: 300
            preferredWidth: 768
            ImageView {
                imageSource: "asset:///sign%20in/top-bg.png"
                preferredWidth: 768
               
            }
            ImageButton {
                defaultImageSource: "asset:///confirm%20order/back-button.png"
            preferredHeight: 60
            preferredWidth: 159
            translationY: 30
            }
        }
        Container {
            layout: DockLayout {
                
            }
            verticalAlignment: VerticalAlignment.Bottom
            ImageButton {
                defaultImageSource: "asset:///main/getpersonalized.png"
                horizontalAlignment: HorizontalAlignment.Left
            }
            ImageButton {
                defaultImageSource: "asset:///main/favourite.png"
                horizontalAlignment: HorizontalAlignment.Right
            }
        }
       attachedObjects: [
           GroupDataModel {
               id: dataModelList
               grouping: ItemGrouping.None
               sortingKeys: ["offer_id"]
               sortedAscending: false
           },
           DataSource {
               id: dataSource
               property variant item
               property variant status
               property variant cat_name_url
               property variant offset:0
               source: ("http://zoogme.com/webservices/catcoupons.php?cat_name=&offset="+offset+"")
               type: DataSourceType.Json
               onDataLoaded: {
                   status =data["status"]
                   if (status == "success"){
                       item=data["result"]
                       console.log(item)
                       dataModelList.insertList(item)
                       myIndicator12321.setRunning(false);
                       myIndicator12321.setVisible(false);
                   }
               }
           }
       ]
  } 
  onCreationCompleted: {
      dataSource.load()
      myIndicator12321.setRunning(true )
      myIndicator12321.setVisible(true  )
      con.touchPropagationMode.None
  }
}

 check my problem

Please use plain text.
Developer
knobtviker
Posts: 127
Registered: ‎05-31-2013
My Device: BlackBerry Z10 Limited Edition
My Carrier: Bonbon

Re: touch Propagation Mode

Change this line and remove your onStarted and onStopped blocks:

touchPropagationMode: TouchPropagationMode.Full
touchPropagationMode: myIndicator12321.running ? TouchPropagationMode.None : TouchPropagationMode.Full
Please use plain text.