Add dependence of material design library.
implementation 'com.google.android.material:material:1.1.0'
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
Background voice: Quran Karim
If this helps just leave a nice word.
bye bye -:)