Questions tagged [shadow]

Questions related to drawing or setting shadows on an object. It refers to graphical shadow in user interfaces and 3D rendering and not to be confused with conceptual shadows (copies) of an object, library, database etc.

Examples of a graphical shadow: enter image description here enter image description here

2031 questions
26
votes
3 answers

Creating a shadow around a canvas drawn shape?

What steps are required to create a shape e.g. rectangle with a shadow from scratch using a Canvas? Adding a shadow layer to the paint used to draw the rectangle yielded no success.
mgibson
  • 6,103
  • 4
  • 34
  • 49
26
votes
1 answer

WPF window shadow effect

I am new to WPF technology. I have the following window declaration in WPF:
Victor
  • 13,914
  • 19
  • 78
  • 147
25
votes
4 answers

How to properly style a text area with inner shadows and scrollbar

I'm putting an inner-shadow on all my controls, inputs and textareas by using the following CSS: input { padding: 7px; -webkit-box-shadow: inset 2px 2px 2px 0px #dddddd; -moz-box-shadow: inset 2px 2px 2px 0px #dddddd; box-shadow: inset 2px…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
25
votes
4 answers

box-shadow on bootstrap 3 container

I'm building a little website using bootstrap. The base structure looks like this:
beesteak
  • 265
  • 1
  • 3
  • 8
24
votes
10 answers

BottomNavigationView - Shadow and Ripple Effect

I was really happy when BottomNavigationView was released one week ago but I am facing some problems which makes me unable to solve it, like to see a shadow over the BottomNavigationView, on the same way as Google Photos Android App shows us: If we…
Filipe Brito
  • 5,329
  • 5
  • 32
  • 42
24
votes
7 answers

Adding inner shadow to top of UIView

I looked up but I couldn't find how I can add an inner shadow to UIView, only top (from top to bottom) for Swift. What is the best way add inner circle in Swift? Edit: I've found some questions & answers on SO however they are either in obj-c or…
senty
  • 12,385
  • 28
  • 130
  • 260
24
votes
3 answers

CollapsingToolbarLayout without shadow in expanded state

CollapsingToolbarLayout from appcompat shows shadow in collapsed state, but when expanded (or expanding in process) shadow disappear My example code https://github.com/NaikSoftware/CollapsingToolbarWithImageAndTabs/tree/master/app Layout
Nickolay Savchenko
  • 1,474
  • 16
  • 28
23
votes
6 answers

Why does a background break a box-shadow inset effect?

Im trying to achieve an inner-shadow effect on a simple box, something like: alt text http://gotinsane.com/test.jpg where the green box is the content inside another box. My problem is that if i give the content box any kind of background, the outer…
Strae
  • 18,807
  • 29
  • 92
  • 131
23
votes
4 answers

Removing the shadow on an android button

I have searched and tryed all found solutions to this. I need to remove the shadow from a button in android. Most of the solutions i found involve using an imagebutton and setting it's background. I tryed that and it works but my button has text so…
Scottyers
  • 261
  • 1
  • 2
  • 6
23
votes
4 answers

JPanel Drop Shadow

I have a JPanel element and I would like added a drop shadow to it, how can I add a nice faded drop shadow to the element? Do I need to use external libraries or is there something that is built in that I can use? Example:
Get Off My Lawn
  • 34,175
  • 38
  • 176
  • 338
22
votes
2 answers

iOS Core Graphics: Draw ONLY shadows of a CGPath

I am drawing a simple path in iOS 5 with Core Graphics: CGMutablePathRef path = CGPathCreateMutable(); CGPathMoveToPoint( path, NULL, center.x , topMargin ); CGPathAddLineToPoint(path, NULL, center.x+20,…
Patrick Oscity
  • 53,604
  • 17
  • 144
  • 168
22
votes
2 answers

How to get shadow on android linear layout?

Possible Duplicate: how to set shadow to a View in android? In my Android app I need a layout with round corners and the background should have some transparency. For this I'm using this xml, it works fine: customshape.xml:
Martin
  • 7,190
  • 9
  • 40
  • 48
22
votes
3 answers

iPhone UITableViewCell layer shadow

I'm trying to add a shadow to a UITableViewCell using the layer.shadowColor, Offset, Radius but it doesn't seem to affect it in any way. The table is grouped style. Any ideas why? Here is the code i'm using: cell.layer.shadowColor= [UIColor…
Narcis
  • 5,862
  • 3
  • 23
  • 30
22
votes
5 answers

Floating action button's shadow clipping at view margins

I have a floating action button anchored to the bottom right of a coordinator layout. It is 16dp from the margins of the view (the margins are included by default and specified in the dimens.xml file), but its shadow is clipping and has a…
user5030423
22
votes
4 answers

Android CardView with a custom shadow color

Is it possible to change the color of the shadow around the CardView? Mainly used to mark selected the card as it were lighted on? Should be valid on L and pre-L devices.
Davideas
  • 3,226
  • 2
  • 33
  • 51