Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7473] Android: Add Shadow (based on png image pattern) to a View

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-07-21T16:15:02.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterMauro Parra-Miranda
AssigneeIngo Muschenetz
Created2012-01-30T13:16:16.000+0000
Updated2017-07-21T16:15:02.000+0000

Description

PROBLEM DESCRIPTION

Customer wants to get views with a smooth drop shadow. Customer wants to add a png image with a pattern, so that one will appear under the view.

EXTRA INFO

Right now, they are using a workaround similar to this one:
//Create a view container 
var container = Ti.UI.createView({
  width:200,
  height:200,
  top:10,
  left:10
});

//Create a drop shadow view
var shadow = Ti.UI.createView({
  width:195,
  height:195,
  right:0,
  bottom:0,
  borderRadius:5,
  opacity:0.5,
  backgroundColor:"#787878"
});
container.add(shadow);
//Create a view for our content
var content = Ti.UI.createView({
  width:195,
  height:195,
  top:0,
  left:0,
  borderRadius:5,
  backgroundColor:"#cdcdcd"
});
content.add(Ti.UI.createLabel({
  text:"Here is some content",
  textAlign:"center",
  color:"#000"
}));
container.add(content);
//Open an application window
var win = Ti.UI.createWindow({
  backgroundColor:"#fff"
}); 
win.add(container); 
win.open();
Instead of adding the container and the shadow, customer wants to have a special view with where you can set the png for the shadow, and a size for it. The goal is having something like the attachment, but with any png.

Comments

  1. Lee Morris 2017-07-21

    Closing ticket as invalid as the customer has a better option, thus removing the need. This is detailed here TIMOB-7459.

JSON Source