Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20076] Android Elevation disappear when set border*

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-05-27T04:11:23.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.4.0
ComponentsAndroid
Labelsn/a
ReporterJong Eun Lee
AssigneeHieu Pham
Created2015-11-30T08:02:34.000+0000
Updated2016-06-24T23:19:06.000+0000

Description

Android Elevation disappear when set border* see result screen shot and code below: Test code

var win = Ti.UI.createWindow({
  backgroundColor : 'white',
  layout : 'vertical'
});

var viewWithElevation = Ti.UI.createView({
  left : 10,
  right : 10,
  top : 30,
  height : 100,
  elevation : 10,
  backgroundColor : 'yellow'
});

var viewWithElevationAndBorderRadius = Ti.UI.createView({
  left : 10,
  right : 10,
  top : 30,
  height : 100,
  elevation : 20,
  backgroundColor : 'yellow',
  borderRadius : 20
});

var viewWithElevationAndBorderWidth = Ti.UI.createView({
  left : 10,
  right : 10,
  top : 30,
  height : 100,
  elevation : 20,
  backgroundColor : 'yellow',
  borderWidth : 2
});

win.add(viewWithElevation);
win.add(viewWithElevationAndBorderRadius);
win.add(viewWithElevationAndBorderWidth);

win.open();

Comments

  1. Jong Eun Lee 2015-11-30

    Check this out. !https://s3.amazonaws.com/f.cl.ly/items/3v2T2c2Q0U3v0N1I1Z2G/5554_nexus5-6-23.png?v=5c0a4143!
  2. Michael Gangolf 2016-05-22

    Working on a solution for this problem at the moment: !http://migaweb.de/roundedelevation.png! combination of getOutlerView() inside TiUIView and setting a setOutlineProvider in TiBorderWrapperView. Looking good so far but I'm still testing some use cases
  3. Jong Eun Lee 2016-05-22

    Great!
  4. Wilson Liaw 2016-05-22

    Thanks! looking forward to it :)
  5. Michael Gangolf 2016-05-22

    PR: https://github.com/appcelerator/titanium_mobile/pull/8011
  6. Hieu Pham 2016-05-24

    I've tested your PR and it works fine on API 21+. Please address my comment on the PR. Thanks!
  7. Lokesh Choudhary 2016-06-24

    Verified the fix. Elevation does not disappear when border radius or border width is set. Closing. Environment: Appc Studio : 4.7.0.201606150733 Ti SDK : 5.4.0.v20160617074028 Ti CLI : 5.0.9 Alloy : 1.9.0 MAC El Capitan : 10.11.4 Appc NPM : 4.2.7-2 Appc CLI : 5.4.0-18 Node: 4.4.4 Nexus 6 - Android 6.0.1

JSON Source