Update for AndroidX:
The answer of @Sub 6 Resources was perfect before androidX was introduced. Now, it is better to include the following dependency instead of the accepted answer's dependency:
implementation 'com.google.android.material:material:1.6.1' NOTE: it mightIt will not be the latest version by the time you are reading this. You can check the version here: https://github.com/material-components/material-components-android/releases