Android EditText:焦点大纲
在我的应用程序中,我有动态数量的编辑文本,在用户更改一些设置后,我需要焦点轮廓图形出现在一些但不是所有编辑文本上。这是为了强调这些领域的重要性。
有没有简单的方法可以做到这一点?我在 这里 看到了一些关于修改某些图形代码的内容,但我认为这不适用我想做的事。
In my app, I have a dynamic number of edittexts and after the user changes some settings I need the focus outline graphic to appear on some but not all of the edittexts. This is needed to highlight the importance of those fields.
Is there an easy way to do this? I have seen some things about modifying some graphic code here but I didn't think that was applicable to what I am trying to do.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
焦点轮廓显示哪个
EditText
框具有焦点。这意味着一次只能是一个。您可以做的是将EditText
放入具有状态可绘制背景的View
中。The focus outline shows which
EditText
box has focus. That means it can only be one at a time. What you can do is put theEditText
in aView
that has a stateful drawable for the background.