eclipsesource / eclipsesource/tabris-js

CollectionView does not position initial cells underneath statusBar

Open
#1,810 2 comments 0 reactions 0 assignees View on GitHub
bug ios
Dominant language
JavaScript
Stars
1.4k
Forks
171
PR merge metrics
No merged PRs in 30d

Description

### Problem description

The bounds of the `CollectionView` are shown underneath the `statusBar` but the initial cells are not. They are positioned below the `statusBar` as if the `dislplayMode` was not set to _float_. It is possible to scroll the cells underneath though.

### Expected behavior

The `CollectionView` should put the initial cells under the `statusBar`.

### Environment

- Tabris.js version: 3.0.0-beta2
- Device: iPhone 6
- OS: iOS 12

### Code snippet

```javascript
import {CollectionView, contentView, statusBar, TextView} from 'tabris';

const items = [
'Apple', 'Banana', 'Cherry', 'Apple', 'Banana', 'Cherry',
'Apple', 'Banana', 'Cherry', 'Apple', 'Banana', 'Cherry',
'Apple', 'Banana', 'Cherry', 'Apple', 'Banana', 'Cherry',
'Apple', 'Banana', 'Cherry', 'Apple', 'Banana', 'Cherry',
'Apple', 'Banana', 'Cherry', 'Apple', 'Banana', 'Cherry',
'Apple', 'Banana', 'Cherry', 'Apple', 'Banana', 'Cherry',
'Apple', 'Banana', 'Cherry', 'Apple', 'Banana', 'Cherry',
'Apple', 'Banana', 'Cherry', 'Apple', 'Banana', 'Cherry',
'Apple', 'Banana', 'Cherry', 'Apple', 'Banana', 'Cherry',
'Apple', 'Banana', 'Cherry', 'Apple', 'Banana', 'Cherry'
];

statusBar.displayMode = 'float';
statusBar.background = '#dddd';

new CollectionView({
left: 0, top: 0, right: 0, bottom: 0,
itemCount: items.length,
createCell: () => new TextView(),
updateCell: (view, index) => {
view.text = items[index];
}
}).appendTo(contentView);

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.