ShinichiroFunatsu / Android-SlideInViewExample

0 stars 1 forks source link

Make shadow #1

Open vegeta2102 opened 4 years ago

vegeta2102 commented 4 years ago

Hi @ShinichiroFunatsu Could you do me a favor ? I'd like to add a shadow like below image. 🙇‍♂️ Screen Shot 2020-05-14 at 14 45 00

(If you have time ! It's not urgent) Thanks :) Vegeta

ShinichiroFunatsu commented 4 years ago

Thank you so much for your forking ! @vegeta2102 :)

I already applied shadow by android:elevation attribute. You can change less elevation value to make it darker.

If you already tried to change this attribute, i think i need more information about your trouble to solve. (Please check drop shadow is clipped or not.)

ShinichiroFunatsu commented 4 years ago

Note: I think 2 reason of drop shadow not working. (if you already applied elevation.)

  1. Wrong shape resource or not using shape xml resources.
  2. Not enough margin on each side. (Even layout_constrain with margin in ConstraintLayout)
ShinichiroFunatsu commented 4 years ago

another solution. (apply this parent layout)

    android:padding="10dp"
    android:clipToPadding="false"
vegeta2102 commented 4 years ago

another solution. (apply this parent layout)

    android:padding="10dp"
    android:clipToPadding="false"

Thank bro! Let me try it feedback to you soon.