[TIMOB-25772] Android: zIndex issue with ListView
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | n/a |
| Reporter | Ibrahim MESLEM |
| Assignee | Unknown |
| Created | 2018-02-12T10:14:15.000+0000 |
| Updated | 2018-02-28T19:55:57.000+0000 |
Description
Hello,
im using listview to display some data , and the problem is when i try to change the zIndex of a view inside the listView item it seems that it doesnt work on android.
bellow you find a simple code to reproduce the issue
index.xml
<Window class="container">
<ListView top="100" id="listView" defaultItemTemplate="userTemplate" >
<Templates>
<ItemTemplate id="userTemplate" name="userTemplate">
<View height="100">
<View id="view1" bindId="view1" height="50" width="50" backgroundColor="red"></View>
<View id="view2" bindId="view2" height="50" width="50" backgroundColor="blue"></View>
</View>
</ItemTemplate>
</Templates>
<ListSection name="users"/>
</ListView>
</Window>
index.js
var win = $.index;
var table = $.listView;
var items = [];
var data = {
"users":[
{
"guid": "4715dafd-c547-4db4-81db-bedb28e6daac"
}
]
};
function preprocessForListView (item) {
return {
view1: {zIndex: 1}, // work
view2: {zIndex : 2} // work
};
}
win.open();
_.each(data.users, function(item){
items.push(preprocessForListView(item));
});
table.sections[0].appendItems(items , null);
// here change the zIndex
setTimeout(function(){
var item = table.sections[0].getItems()[0];
item.view1 = {zIndex : 2}; // doesn't work
item.view2 = { zIndex : 1}; // doesn't work
table.sections[0].updateItemAt(0 , item , null);
},2000);
SDK : 7.0.1.GA
Hello, I was able to reproduce the issue with SDK 7.0.1.GA in Android. I see changeing the zIndex of a view inside the listView item doesn't work on android. In iOS it's fine. Moving to TIMOB. Thanks.