title: Nativescript RadListView: How to change background color programmatically on selected item?
body: <p>Doing this programmatically in the code behind (not binding to XML), everything works except my background color does not show when the item is selected. No errors and my images show up fine. What's messed up in my code? (Thanks!)</p>
  
  <p>I'm running <code>{N} CLI    "tns-android":"version": "3.4.2", "nativescript-ui-listview": "3.5.1"</code>.</p>
  
  <pre><code>&lt;GridLayout columns="auto, *"&gt;
      &lt;StackLayout col="0" id="containers"&gt;
      &lt;/StackLayout&gt;
      &lt;StackLayout col="1" id="notes"&gt;
      &lt;/StackLayout&gt;
  &lt;/GridLayout&gt;
  
  
  function setContainers() {
      myCntnrPics.forEach(function (element) { // Need to it in ObservableArray
          pathToCntnrBitmapsArray.push(element);
      });
  
      let radListLeft = new listview.RadListView();
      // iOS NEEDS height set
      radListLeft.height = 2000;
      radListLeft.items = pathToCntnrBitmapsArray;
      let gridLayout = new listview.ListViewGridLayout();
      gridLayout.scrollDirection = "Vertical";
      radListLeft.selectionBehavior = "Press";
      radListLeft.itemSelected = "selected";
      radListLeft.on("itemSelected", function (ListViewEventData) {
          const item = pathToCntnrBitmapsArray.getItem(args.index);
          item.selected = true;
          console.log("itemSelected is true -----"); // This does not show up
      });
      radListLeft.on("itemTap", function (element){
          var selectedItemPath = pathToCntnrBitmapsArray.getItem(element.index).toString();
          console.log("on itemTap selectedItemPath: " + selectedItemPath); // shows correctly
      });
      if (application.android) {
          // Android needs H &amp; W
          radListLeft.itemTemplate = "&lt;StackLayout backgroundColor='{{ selected ? 'red' : 'white'}}'&gt;&lt;Image src='{{ $value }}' height='123' width='123' loadMode='async' class='items'/&gt;&lt;/StackLayout&gt;";
      } else if (application.ios) {
          radListLeft.itemTemplate = "&lt;StackLayout backgroundColor='{{ selected ? 'red' : 'white'}}'&gt;&lt;Image src='{{ $value }}' class='items'/&gt;&lt;/StackLayout&gt;";
          gridLayout.itemHeight = 123;
          gridLayout.itemWidth = 123;
      }
      gridLayout.spanCount = 1;
      radListLeft.listViewLayout = gridLayout;
      let myContainers = page.getViewById("containers");
      myContainers.removeChildren();
      myContainers.addChild(radListLeft);
  }
  </code></pre>