[TIMOB-25759] Android: ListItem selectedBackgroundColor property not working.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 7.0.1, Release 8.0.2 |
Fix Version/s | n/a |
Components | Android |
Labels | andorid, engSchedule, listitem |
Reporter | Jebun Naher |
Assignee | Yordan Banev |
Created | 2018-02-07T09:22:00.000+0000 |
Updated | 2019-09-19T15:25:30.000+0000 |
Description
*Issue Description:*
The selectedBackgroundColor property of ListItem is not working on android.
*Test Steps:*
- Create an alloy project and run the test code.
- Click on the listView row.
Observe that the selectedBackgroundColor does not set the row's background color when selected.
*Expected:*
ListView row's background color should change when I click on the row.
*Actual:*
ListView row's background color does not change.
*Test Code:*
*index.xml*
<Alloy>
<Window title="basic" backgroundColor="red">
<ListView id="listView" >
<ListSection id="section">
<ListItem title="row 1" />
<ListItem title="row 2" />
<ListItem title="row 3" />
<ListItem title="row 4" />
<ListItem title="row 5" />
<ListItem title="row 6" />
<ListItem title="row 7" />
<ListItem title="row 8" />
<ListItem title="row 9" />
<ListItem title="row 10" />
</ListSection>
</ListView>
</Window>
</Alloy>
*index.js*
$.listView.addEventListener('itemclick', function(e) {
var item = $.section.getItemAt(e.itemIndex);
item.properties.selectedBackgroundColor = 'yellow';
$.section.updateItemAt(e.itemIndex, item);
});
$.index.open();
Thanks!
No comments