I am trying to add a Toolbar
to my android studio project. I found several explanations of how should I do it and they all explained these steps. In the first s
Since you are using Androidx libraries you have to:
import androidx.appcompat.widget.Toolbar
.import androidx.appcompat.app.AppCompatActivity;
<androidx.appcompat.widget.Toolbar
in your layoutIf you want to use the Material Components Library
implementation 'com.google.android.material:material:<version>'
Theme.MaterialComponents.*
themecom.google.android.material.appbar.MaterialToolbar
in your code and in your layout