Android App Development
iOS App Development
Flutter 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 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
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.
Thast’s all.
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*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
All communication is done through a ticket system. I appreciate the regular almost daily updates of what is being worked on, and communicating changes or updates is easy through this system. Mobikul's response timeframe is quick.
Josh Arnold
Owner, Shop ATV Escape
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.