Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28313] iOS: ListView multiple selection when editing renders grey box instead of check

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionNot Our Bug
Resolution Date2021-02-22T18:45:31.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterBrian García
AssigneeVijay Singh
Created2021-01-08T09:10:05.000+0000
Updated2021-02-22T18:45:31.000+0000

Description

As you can see in the attached image, listView renders a grey box instead of the check icon

Attachments

FileDateSize
IMG_5DF069390814-1.png2021-01-08T09:09:00.000+0000193294
Simulator Screen Shot - iPhone 12 Pro Max - 2021-01-14 at 12.05.04.png2021-01-14T11:05:37.000+0000159609
TestTableView_selection.zip2021-01-29T19:50:51.000+000068466

Comments

  1. Vijay Singh 2021-01-09

    [~bgarcia] Can you provide small test case to reproduce the issue? Thanks!
  2. Brian García 2021-01-14

       var win = Ti.UI.createWindow({ backgroundColor: "white", fullscreen: true });
         var plainTemplate = {
           childTemplates: [
             {
               type: "Ti.UI.Label", // Use a label
               bindId: "rowtitle", // Bind ID for this label
               properties: {
                 backgroundColor: "white",
                 width: "fill",
                 // Sets the Label.left property
               },
             },
           ],
         };
       
         var listView = Ti.UI.createListView({
           templates: { plain: plainTemplate },
           defaultItemTemplate: "plain",
           editing: true,
           AllowsMultipleSelectionDuringEditing: true,
         });
         var section = Ti.UI.createListSection();
         var sectionData = [];
         var i = 25;
         for (var k = 0; k < 25; k++) {
           sectionData.push({
             rowtitle: { text: "Row " + (k + 1) },
             properties: {
               canEdit: true,
             },
           });
         }
         section.setItems(sectionData);
         listView.sections = [section];
         win.add(listView);
         win.open();
       
    After generating the sample, I've noticed that the error is that selected rows does not changes template background color if it's setted. !Simulator Screen Shot - iPhone 12 Pro Max - 2021-01-14 at 12.05.04.png|thumbnail!
  3. Vijay Singh 2021-01-29

    This is not an issue. The behavior is same as of native. On selection the selected background color, which changes, is behind the views which are added on cell. This is nothing to do with multiple selection with editing. See the attached native example [^TestTableView_selection.zip] . [~bgarcia] Probably you want to use [selectedBackgroundColor ](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListItem-property-selectedBackgroundColor) to match the selection color with your view's color.
  4. Brian García 2021-02-19

    Ok, thank you very much for the clarification

JSON Source