blackberry 10 - BB 10 cascade Listview textstyle color randomly updated after scrolling -


in bb10 app have listview textstyle having green color , red color random text. when scroll list view color shifts , set wrong texts example:

apple ==> red bananna == > green after scrolling  apple ==> green bananna ==> red 

this long list happens items visible after scrolling

thanks in advance

i have got solution below code

label {       id: alerttypelable        text: qstr(listitemdata.alerttype) + retranslate.onlanguagechanged       horizontalalignment: horizontalalignment.left       verticalalignment: verticalalignment.center       textstyle.fontsize: fontsize.xsmall       textstyle.color: {           if (listitemdata.success.tostring() == "true") {               return color.green           }           else {               return color.red           }       } } 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -