0

How to implement the below functionality of Gmail app for Android.

Initially the area below the text 'Mon, May 19..' does not have any shadow below it. But when the email content is scrolled up, a shadow appears below 'Mon, May 19..' as seen in the 2nd image . Again on scrolling up, the shadow disappears.

Before Scrolling : without shadow

GUI on scrolling : with shadow. with Shadow

Is there any way we can get this kind of behavior in android apps?

Thanks in advance,

Code_Yoga
  • 2,968
  • 6
  • 30
  • 49

1 Answers1

0

You can make this function with 2 different layouts and adding layout_margin="2dp" or "3dp", you can find the optimum dp value with trying. First Layout (below layout) will be your shadowed effect background, if you make its drawable resource with gradient effect.

CanDroid
  • 633
  • 6
  • 15