eclipsesource / eclipsesource/tabris-js
CollectionView cell layout inconsistent between platforms
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
iOS client makes the container as big as its children while the Android client spans the container to fit the parent.
``` javascript
var IMAGE_PATH = "images/";
var people = [
["Holger", "Staudacher", "holger.jpg"],
["Ian", "Bull", "ian.jpg"],
["Jochen", "Krause", "jochen.jpg"],
["Jordi", "Böhme López", "jordi.jpg"],
["Markus", "Knauer", "markus.jpg"],
["Moritz", "Post", "moritz.jpg"],
["Ralf", "Sternberg", "ralf.jpg"],
["Tim", "Buschtöns", "tim.jpg"]
].map(function(element) {
return {firstName: element[0], lastName: element[1], image: IMAGE_PATH + element[2]};
});
var page = tabris.create("Page", {
title: "Collection View",
topLevel: true
});
tabris.create("CollectionView", {
layoutData: {left: 0, top: 0, right: 0, bottom: 0},
items: people,
itemHeight: 64,
initializeCell: function(cell) {
var container = tabris.create("Composite", {background: "red"}).appendTo(cell);
tabris.create("Label", {layoutData: {right: 0, top: 0, width: 100}}).set("text", "Foo").appendTo(container);
}
}).on("selection", function(event) {
console.log("selected", event.item.firstName);
}).appendTo(page);
page.open();
```
Contributor guide
Assessment
This issue has not been assessed yet.