🔴 ANDROID PROGRAMMING CHANNEL
3.82K subscribers
417 photos
203 videos
391 files
309 links
🌀Channel :
➡️ https://telegram.me/AndroidStudyChannel
🌀Group :
➡️ https://t.iss.one/+QE5EFwRKmt04NzZk

ادمین تبادل و تبلیغات : @n_h_raad
درخواست آموزش : @developerjavad
ابتدای کانال :
https://t.iss.one/AndroidStudyChannel/5
Download Telegram
Using Material Design Shadow
____________________________
Shometimes you try to use shadow in your apps but it doesn't work
To Note The Following:
1-It works only on android 5 or above
2-Set background non transparent color for Parent layout even #FFF
3-Set background non transparent color for Child layout even #FFF
4-Add these attributes to Child Layout»
android:translationZ="2dp"
android:elevation="2dp"
Care about that when you have More than 2 elements don't use same translationZ becuase 2objects that have same translationZ wont make shadow
the formula for real object height : translationZ + elevation

You can read more :
https://material.google.com/what-is-material/elevation-shadows.html
https://developer.android.com/training/material/shadows-clipping.html