I am currently using Material Design TextInputLayout OutlinedBox as shown below:
I am using the below material libs to get spinner
implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'com.google.android.material:material:1.2.1'
Here is my layout look like
Check out this image for the spinner