Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27119] Android: Views inside horizontal layout are clipped to the top

GitHub Issuen/a
TypeBug
PriorityNone
StatusResolved
ResolutionNeeds more info
Resolution Date2019-06-01T03:11:42.000+0000
Affected Version/sRelease 8.0.1, Release 7.5.2, Release 8.1.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterHans Knöchel
AssigneeUnknown
Created2019-06-01T03:00:27.000+0000
Updated2019-06-01T03:11:42.000+0000

Description

Subviews inside a horizontal parent view are clipping to the top on Android. On iOS, they are centered on the y-axis like other views are as well. This is a parity issue. Example:
var win = Ti.UI.createWindow({ backgroundColor: 'white' });

var view = Ti.UI.createView({ layout: 'horizontal', height: 50, backgroundColor: 'gray' });
view.add(Ti.UI.createView({ left: 10, width: 40, right: 10, backgroundColor: '#ff0', height: 20 }));
view.add(Ti.UI.createView({ left: 0, width: Ti.UI.FILL, right: 10, backgroundColor: '#f00', height: 20 }));

win.add(view);
win.open();

Attachments

FileDateSize
Ohne Titel 2.png2019-06-01T03:08:27.000+000019909

Comments

  1. Hans Knöchel 2019-06-01

    Mhh, it seems like in the above case, it clips on iOS as well. We have one layout case where it doesn't but I can't define it right now. Closing for now.

JSON Source