eclipsesource / eclipsesource/tabris-js

Layout bug: placing widged below baseline aligned sibling broken on Android

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

Description

The following snippet leads to a broken layout on Android.
iOS is layouting the snippet correctly.

``` javascript
var page = tabris.create("Page", {
title: "Baseline bug",
topLevel: true
});

var a = tabris.create("TextView", {
text: "A"
}).appendTo(page);

var b = tabris.create("TextView", {
layoutData: {top: [a, 10]},
text: "B"
}).appendTo(page);

var c = tabris.create("TextView", {
layoutData: {left: [b, 10], baseline: b},
text: "C"
}).appendTo(page);

var d = tabris.create("TextView", {
layoutData: {left: [b, 10], top: [c, 10]},
text: "D"
}).appendTo(page);

page.open();
```

Problem: on Android D is not correctly placed below C while C is baseline aligned next to B.
This is a known bug on Android: https://code.google.com/p/android/issues/detail?id=73697&thanks=73697

Screenshot iOS:
![img_0026](https://cloud.githubusercontent.com/assets/185295/6329901/79e9e0f0-bb74-11e4-906f-f8c0e17b0af4.PNG)
Screenshot Android:
![screenshot_2015-02-23-15-50-36](https://cloud.githubusercontent.com/assets/185295/6329902/79ea5922-bb74-11e4-897d-0202f1132264.png)

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.