作者:郑小蒜9299_941611_G | 2023-09-10 16:23
1> Sujit..:
你必须将提示设置为TextInputLayout
这是代码.
TextInputLayout textInputLayout = (TextInputLayout)findViewById(R.id.text_input_layout);
textInputLayout.setHint("Hello");
该代码破坏了辅助功能支持(TalkBack)。我想出的唯一可行的解决方案`TextInputLayout textInputLayout =(TextInputLayout)findViewById(R.id.text_input_layout); textInputLayout.setHint(“ Hello”); textInputLayout.getEditText()。setHint(hint); textInputLayout.getEditText()。setHintTextColor(getResources()。getColor(android.R.color.transparent));`
谢谢。您的回答节省了我的时间。