Check Mobile App
Read now
Start a Project

How to show shadow in toolbar below API 21

Save

In this blog,
I have shown you how to make a drop shadow in the toolbar below API 21.

Implementation

In this example, I have created a custom background XML(drop shadow) and applied it inside the FrameLayout.
And this will give a drop shadow effect on the toolbar.

toolbar.xml

 

 your_layout.xml

 

dropshadow.xml

Note: Don’t forget to hide your view if the device you are running is >= to Lollipop.

if not you’ll end up with two shadows.

 

 

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


6 comments

  • Nara
    Thanks. After every site i searched for, it’s the first site that really works!
    • Aman Gupta
      Your most welcome @disqus_mWMUto60IT:disqus . We always try to write very needful blogs for all android/ios developers.
  • Ricardo
    Thank you, its help me
    • Aman Gupta (Moderator)
      Your most welcome @Ricardo.
  • Bhola Nath Mahto
    Thanks it works
    • Aman Gupta (Moderator)
      Your most welcome.
  • css.php

    When I think in getting solutions for my Ecommerce Platform, I think of Webkul. They have been such a blessing in our business. We have spent thousands of dollars in support and modules from them. We love their support team. They work very closely with us, and they always go the extra mile when we need help.

    Michael Urresta

    Michael Urresta

    Talk to Sales

    Global

    Live Chat
    Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home