从 AutoCompleteTextView 中删除波纹效果

问题描述 投票:0回答:2

我里面有

AutoCompleteTextView
TextInputLayout
。从下拉菜单中选择项目时,如何消除 AutoCompleteTextView 中的涟漪效应。

我说的是小部件上的波纹,而不是下拉菜单内的波纹。

android material-design
2个回答
0
投票

你可能有这样的东西

ArrayAdapter<String> adapter = new ArrayAdapter<String> (this,android.R.layout.select_dialog_item,language);
android.R.layout.select_dialog_item
更改为您的服装 xml


0
投票

有2个解决方案

  1. 在主题中使用 colorControlHighlight 属性,并使用样式将其应用到 TextInputLayout。

  2. 在MaterialAutoCompleteTextView中设置

    android:inputType="textNoSuggestions"
    。基本上我们需要设置任何可编辑的 inputType,那么波纹就不会出现。

© www.soinside.com 2019 - 2024. All rights reserved.