Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 188.8.131.52 release ready!
Owner and Founder. Opencart
In this blog, we will learn about how we can change drawers color and behavior.
We all have seen the beauty of drawer layout and its usefulness as per our need while developing our Android applications.
But what many of us don’t know is the full capability of drawer layout.
In this blog, we will increase our knowledge about the drawer layout.
Firstly, let’s just start with changing the scrim color to our need. For those who are wondering what exactly the scrim color is, let me explain:
Do you notice, when we open the drawer, the screen on the right side goes dark, this is called scrim.
In the above code, you can replace RED with your own color of choice and also, if you don’t find the color already defined in the COLOR class, then you can use the hex value of your color as a string like in the example below :
Now we will try to change the behavior of drawer layout by scrolling our whole background with the drawer.
For this, all you need to do is override onDrawerSlide function of your ActionBarDrawerToggle.
and use as per your case.
For what I needed, I just had to override the onDrawerSlide function.
You can also explore other functions of the parent class as per your use case. Some of which might be useful are :
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.