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
46
votes
4 answers

Android change Material elevation shadow color

is it possible to change the shadow color produced by the xml elevation property? I want the shadow be dynamically changed by code.
Broadwell
  • 1,343
  • 2
  • 19
  • 33
45
votes
7 answers

How to apply shadow to ImageView?

I want to apply shadow to the ImageView. When I'm applying shadow to a TextView I'm getting it but same it's not getting to ImageView. How can I solve this problem?
45
votes
9 answers

Appcompat v21 Toolbar elevation pre-lollipop

First off, I know that this question has been asked before, but it hasn't been answered before. I hope someone can give me an answer. In my application, I use the Toolbar from Appcompat_v7 (API 21). This is my…
41
votes
3 answers

iOS - How to achieve emboss effect for the text on UILabel?

Can I know how to have the emboss effect as the text "Reminders" as shown on the picture? It looks like the text are embedded? Thanks
Jackson Tale
  • 25,428
  • 34
  • 149
  • 271
40
votes
5 answers

Creating a shadow for a UIImageView that has rounded corners?

I am trying to create an ImageView that has rounded corners and a shadow to give it some depth. I was able to create a shadow for the UIImageView, but whenever I added the code to also make it have rounded corners, it only had rounded corners with…
John Hodge
  • 469
  • 1
  • 5
  • 9
39
votes
1 answer

What are the real rules for linux usernames on CentOS 6 and RHEL 6?

I'm writing some web UI pages that can be used to create Linux user accounts. This web UI will be used on CentOS 6 (which is derived from RHEL 6). I'm finding inconsistent and incomplete information about what constitutes a valid Linux user name. …
Alan Carwile
  • 735
  • 1
  • 7
  • 14
39
votes
3 answers

How can I add shadow to a fontawesome svg icons?

I'm using SVG Font Awesome icons in a simple HTML doc, and I want add shadows to them. So I tried doing...
...but it doesn't work. So, what is the correct way…
oramoetaro
  • 543
  • 1
  • 6
  • 9
39
votes
5 answers

Android Drop Shadow on View

I have done some extensive searching for code examples on this but cannot find anything. In particular, I am looking to add a shadow to a png drawable I am using in an ImageView. This png drawable is a rounded rect with transparent corners. Can…
coneybeare
  • 33,113
  • 21
  • 131
  • 183
39
votes
7 answers

How to remove FloatingActionButton's surrounding shadow?

I'm trying to replace the third party FloatingActionButton with the native one which is packaged in library com.android.support:design:22.2.0.The default look has a dark shadow around the image,How can I get rid of it? I know the former one provides…
tounaobun
  • 14,570
  • 9
  • 53
  • 75
39
votes
1 answer

android:elevation only have shadow effects on the bottom side, how to make the shadow effects show on top side?

I use a framelayout at the bottom of an activity, in order to show the shadow effects on the fragment, I add android:elevation. But the shadow effects only appear in the bottom side not on top side, any one could give me some advice?
39
votes
1 answer

setShadowLayer Android API differences

I develop a custom view component for my application and I am struggling with adding a shadow to a circle. Here is the code of my class extending View public class ChartView extends View { public ChartView(Context context, AttributeSet…
Al_th
  • 1,174
  • 1
  • 12
  • 24
37
votes
2 answers

Fastest way to do shadows on iOS?

QuartzCore .layer.shadow's suck up performance. They appear to need to be re-rendered every time something changes, causing everything to lag. Coregraphics gradient (for 1 way shadows) - doesn't look right. if your gradient goes from 0.3 alpha to 0,…
Andrew
  • 15,935
  • 28
  • 121
  • 203
36
votes
6 answers

CALayer - Shadow causes a performance hit?

So I am doing some custom animations on my navigationcontroller and the way it pushes and pops the viewControllers. Everything runs smooth. As soon as I add the following code (In a subclass of UINavigationController), I face a huge performance hit.…
aryaxt
  • 76,198
  • 92
  • 293
  • 442
36
votes
2 answers

What does "shadowing" mean in Ruby?

If I do the following with warnings turned on under Ruby 1.9: $VERBOSE = true x = 42 5.times{|x| puts x} I get warning: shadowing outer local variable - x Presumably it's to do with using x as a block parameter as well as a variable outside of…
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
36
votes
3 answers

How to change direction of android elevation shadow?

I have FrameLayout with android:elevation="4dp". Shadow of this elevation directed down. I want change direction of shadow to up.