Material design Spinner using TextInputLayout.OutlinedBox styling

前端 未结 8 1091
暗喜
暗喜 2021-02-05 11:31

I am currently using Material Design TextInputLayout OutlinedBox as shown below:

        

        
8条回答
  •  失恋的感觉
    2021-02-05 12:06

    I solved my problem using this: in XML:

    
    
            
        
    

    in code:

            layout.keyListener=null
            ArrayAdapter(it, android.R.layout.simple_list_item_1, list).also { 
             adapter ->
                layout.setAdapter(adapter)
            }
    

    Credits:How to make EditText not editable through XML in Android?

提交回复
热议问题