javascript - Never image with a custom ListView in appcelerator -


i'm building app appcelerator show listview custom template. code of xml file:

<listview id="elementslist" defaultitemtemplate="elementtemplate">             <templates>                 <itemtemplate name="elementtemplate" class="itemtemplate">                      <view id="atomproperties">                         <label bindid="name" id="name" />                         <view id="secondline">                             <label class="line2 fieldlabel" text="from: " />                             <label class="line2" bindid="datestart" id="datestart" />                             <label class="line2 fieldlabel" text=" to: " />                             <label class="line2" bindid="dateend" id="dateend" />                         </view>                         <label bindid="quantity" id="quantity" left="0"/>                     </view>                 </itemtemplate>             </templates>             <listsection>                                <listitem quantity:text="10 minute" quantity:color="#090"  name:text="hydrogen" datestart:text="10-10-2016" dateend:text="10-12-2016"/>                 <listitem quantity:text="15 minute" quantity:color="#090" name:text="helium" datestart:text="02-01-2015" dateend:text="10-10-2019"/>                 <listitem quantity:text="25 minute" quantity:color="#090" name:text="lithium" datestart:text="01-01-2001" dateend:text="01-01-2018"/>                 <listitem quantity:text="10 minute" quantity:color="#090"  name:text="hydrogen" datestart:text="10-10-2016" dateend:text="10-12-2016"/>                 <listitem quantity:text="15 minute" quantity:color="#090" name:text="helium" datestart:text="02-01-2015" dateend:text="10-10-2019"/>                 <listitem quantity:text="25 minute" quantity:color="#090" name:text="lithium" datestart:text="01-01-2001" dateend:text="01-01-2018"/>             </listsection>         </listview>  

this part of tss file:

"listitem": {     accessorytype: titanium.ui.list_accessory_type_disclosure } 

so if try start application, can see this:

enter image description here

and ok. want set listsection data database.

so i'm delete xml file code:

<listitem quantity:text="10 minute" quantity:color="#090"  name:text="hydrogen" datestart:text="10-10-2016" dateend:text="10-12-2016"/>                 <listitem quantity:text="15 minute" quantity:color="#090" name:text="helium" datestart:text="02-01-2015" dateend:text="10-10-2019"/>                 <listitem quantity:text="25 minute" quantity:color="#090" name:text="lithium" datestart:text="01-01-2001" dateend:text="01-01-2018"/>                 <listitem quantity:text="10 minute" quantity:color="#090"  name:text="hydrogen" datestart:text="10-10-2016" dateend:text="10-12-2016"/>                 <listitem quantity:text="15 minute" quantity:color="#090" name:text="helium" datestart:text="02-01-2015" dateend:text="10-10-2019"/>                 <listitem quantity:text="25 minute" quantity:color="#090" name:text="lithium" datestart:text="01-01-2001" dateend:text="01-01-2018"/> 

and controller.js i'm building code:

function populatetable(){     var collection = alloy.createcollection("socialhistorydao");     collection.fetch();     collection.foreach(function(e, i, a) {         items.push({                                 datestart : {text : e.get("datestart")},          name : {text : e.get("displayname")},         dateend : {text : e.get("dateend")},          quantity : {color:"#090", text : e.get("quantity")+" "+e.get("unitymeasure")}                        });      });     $.elementslist.sections[0].setitems(items);  } 

if try start application can see list view never symbol ">" @ right of every items.

how can fixed it?

there no listitems in code anymore, adding styling won't work of course.

however, can style template. change identifier , should work

".itemtemplate": {     accessorytype: titanium.ui.list_accessory_type_disclosure } 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -