1

Shadow layer work with the emulator but not on an actual device

view story
linux-howto

http://stackoverflow.com – I'm creating a custom drawable (it extends from Drawable) and i'm trying to put a shadow effect on it. Here's a part of my code : public void draw(Canvas canvas) { Path path = new Path(); path.moveTo(0, 0); path.lineTo(0, Y/2); path.lineTo(X/2, Y); path.lineTo(X, Y/2); path.lineTo(X, 0); path.lineTo(0, 0); Paint paint = new Paint(); paint.setColor(context.getResources().getColor(R.color.red_dark)); paint.setStyle(Style.FILL_AND_STROKE); paint.setStrokeWidth(2f); paint.setShadowLayer(1, 0, 10f, context.getResources().getColor(R.color.black)); (HowTos)