I am currently using Material Design TextInputLayout OutlinedBox as shown below:
I am assuming you want to have an Exposed drop-down menu inside the TextInputLayout
I had the same problem, what you can do is use AutoCompleteTextView
inside your TextInputLayout
as in the following in the XML
. here's an example of how I approached the issue.
You will also need an item layout resource to populate the dropdown popup. The example below provides a layout that follows the Material Design guidelines.
res/layout/dropdown_menu_popup_item.xml
In your class add the following code depending on what you want.
String[] type = new String[] {"Bed-sitter", "Single", "1- Bedroom", "2- Bedroom","3- Bedroom"};
ArrayAdapter adapter =
new ArrayAdapter<>(
this,
R.layout.dropdown_menu_popup_item,
type);
AutoCompleteTextView editTextFilledExposedDropdown =
findViewById(R.id.filled_exposed_dropdown);
editTextFilledExposedDropdown.setAdapter(adapter);
incase this doesn't help kindly check Exposed Dropdown Menus in material design page. [https://material.io/develop/android/components/menu/][1]
This is my first answer on stack overflow I hope it helps.