gpt4 book ai didi

android - TextInputLayout 错误文本填充

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:53:56 24 4
gpt4 key购买 nike

我将 TextInputLayoutAppCompatEditText 一起使用,为 AppCompatEditText 设置基于自定义 xml 形状的背景。每当我设置一些错误时,错误行从布局的开头开始。有什么方法可以填充该错误行。

enter image description here

最佳答案

您可以使用以下方法引用错误 TextView:

TextView textView = (TextView) inputLayout.findViewById(android.support.design.R.id
.textinput_error);

然后你可以得到它的布局参数来使用。

关于android - TextInputLayout 错误文本填充,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34917677/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com