Very trivial question on Listing 25.8


#1

Hi,

Is the corner radius of shadow set intentionally to 5dp against 3dp of original button shape?

Thanks,


#2

I somewhat agree here. However, if you play with the setting of the corner radius, and make it 10dp (just to exaggerate the result and see what is happening)…you get an interesting, smaller shadow by bending in the corners more. There could be a positive statement to be made about a tighter corner on the shadow, though I would also prefer 3dp vs the 5dp that the book shows (let alone the 10dp exaggeration!).

On a separate topic regaring 25.8:

I also originally thought it would be good to have some more discussion on the gradient attributes. However, it is probably more valuable to play with the settings yourself to understand what is going on. Researching the GradientDrawable, and also Color (if you don’t understand the use of both #RGB and #ARGB), and then playing with the settings along different extremes will be the best learning experience.

For example, tuning centerY attribute to be .2, .5, and .8 in three different runs will let you see what the Android documentation is vague with. I would assume this is a standard notation that you might be familiar with in other graphics editors, but alas, I’m not yet accomplished with graphics design. I’ll stop short there, so anyone else who also was confused at first glance, is still encouraged to play with the attributes.


#3

it is probably more valuable to play with the settings yourself to understand what is going on. Researching the GradientDrawable, and also Color (if you don’t understand the use of both #RGB and #ARGB), and then playing with the settings along different extremes will be the best learning experience…!!!