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 220.127.116.11 release ready!
Updated 26 June 2019
In this blog, we will learn about using material components in Android.
With the release of new Material components library, you get a hot box of powers for creating your own user interaction components easily.
But these features were already present in the design support library. So why should I use this new component Library?
Well, the answer to this can be seen in much details over here. But what I found exciting was a whole list of built-in components and their styles that can change the whole layout of your components efficiently. Moreover, you can now use these :
And the UI components that now you can create and style amounts to a huge list.
But what we currently want to focus on is how you can use this in your android project/ application.
What official document recommends is you migrate to “androidx” and start coding into it for easy implementation. if you want to do that then you will need to have an android studio 3.2 ( which currently is in its canary build Stages).
But don’t worry this does not mean that you cannot use this component library.
You can definitely use this on android studio 3.1 as well. All you need to do is follow their documentation ( which i find personally hard) or read along :
Start using androidx and for this, all you need to do is read carefully this page and follow along.
Update your dependencies and other requirements as mentioned below :
You are now Good to go. After this, all you need to do is set the style of the component you are going to use (either through style attribute of the Layout element, if you just wish to change the style of a particular element or through the styles.xml for global settings across your application).
app-level “build.gradle” file :
styles.xml File :
Layout sample file :
Hope this helps you in getting an idea of how easily you can start using the new material components in your android applications.
Keep Coding, Keep Sharing 🙂
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.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.