问题标签 [textinputlayout]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - 当编辑文本不在焦点时,使用 textinputlayout 隐藏密码切换
这是我在项目中使用的代码:
这就像它说的那样工作,即它为我提供了嵌套编辑文本的密码切换。我想要的是当编辑文本没有焦点时是否可以隐藏它?
android - 如何同时应用 TextInputLayout 样式和 errorTextAppearance 样式
我正在尝试在文本输入中实现这两种样式,但在应用errorTextAppearance
样式时它不起作用我收到错误。
XML
JAVA
风格
android - Switch inside TextInputLayout
I would like to accomplish the task shown in the two images below; more precisely, be able to "extend" somehow the TextInputLayout to the Switch so that it is included in the forementioned layout, along with the TextInputEditText.
All tries I have done so far have failed me.
The XML code for one item is listed below:
And here are the two images (image 1 is how it's currently presented and image 2 is what I would like to accomplish - see Linkedin). Though, not sure if it's possible to do this.
android - 如何从 Kotlin 中的 TextInputLayout 获取文本?
我有一个 ID 为 login_mobile_number 的文本输入布局,我已导入此模块以停止使用findViewById
方法:
每当我尝试从 TextInputLayout 获取文本时
它返回对象名称而不是输入的字符串,如下所示:
为什么会发生这种情况?从该字段获取字符串的正确方法是什么?
android - 是否可以在 TextInputLayout 中为错误标签保留空间?
我的布局中有多个 TextInputLayouts,我需要验证字段(如果它们无效则显示错误文本)。
但是TextView
包含错误是由TextInputLayout
动态添加的,因此它会更改布局高度,并且底部的所有视图都将降低 added 的高度TextView
。
所以问题是:即使没有显示错误,我是否可以为错误文本保留空间?