Lam*_*pos 5 android popup textview
有没有办法在TextView中为错误弹出窗口设置自定义布局:
.
在textView.setError(String, Drawable)我们只能设定一个错误图标.
类中的showError()方法TextView and ErrorPopup是私有的,所以我无法使用它们.
有任何想法吗?提前致谢!迈克尔
UPD:
感谢您的评论,但据我了解,主题技巧在这里不适用:(来自android-10的TextView 3384行)
void fixDirection(boolean above) {
mAbove = above;
if (above) {
mView.setBackgroundResource(com.android.internal.R.drawable.popup_inline_error_above);
} else {
mView.setBackgroundResource(com.android.internal.R.drawable.popup_inline_error);
}
}
Run Code Online (Sandbox Code Playgroud)
在android-15中使用com.android.internal.R.styleable.Theme_errorMessageBackground主题参数,但它是内部的.
因此,我没有看到任何解决此问题的方法,除了编写我自己的错误通知器):
| 归档时间: |
|
| 查看次数: |
2005 次 |
| 最近记录: |