android - 带有 TextInputEditText 的 TextInputLayout:EMS 自更新后损坏
问题描述
在将我的库更新到最新版本后,我注意到使用 ems 的代码TextInputEditText
不再起作用。我找不到背后的原因。
在更新之前有效的代码现在看起来不像这样(我的意思是 TextView 不再像 EMS 建议的那样宽,但默认为最小宽度)
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:hint="Some hint"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="parent">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/tiet"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:autofillHints="Some Hint"
android:imeOptions="actionNext"
android:importantForAutofill="yes"
android:inputType="text"
android:ems="7" />
</com.google.android.material.textfield.TextInputLayout>
解决方案
推荐阅读
- java - 直接递归与 While 循环的时间复杂度性能
- machine-learning - 平均绝对误差的偏导数
- php - 有没有办法在 OOP/PHP 中转储方法定义?
- ios - 当应用程序处于前台时,适用于 iOS 的 Flutter FCM 推送通知
- javascript - Chartjs:同一标签的多个数据值
- node.js - node_modules/.cache/babel-loader 文件夹中有数千个文件是否正常?
- azure-devops - 如何在 Azure Devops 上的发布管道中下载多个构建工件?
- java - 如何让 Spring 只看到添加到 url 的最后一个路径变量?
- javascript - 使用 Express.js 制作的 Web 应用程序是否需要捆绑分发?应用程序的分发版本的目的是什么?
- scala - Spark 工作节点无法访问主节点上的文件