首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Android概述了没有正确显示标签的材料组件

问Android概述了没有正确显示标签的材料组件
EN

Stack Overflow用户
提问于 2021-12-18 22:21:03
回答 1查看 72关注 0票数 1

我有以下编辑框(从材料库)

代码语言:javascript
复制
<com.google.android.material.textfield.TextInputLayout
    android:id="@+id/myTitle"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:endIconMode="clear_text"
    app:counterEnabled="true"
    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
    app:counterMaxLength="20"
    >

    <com.google.android.material.textfield.TextInputEditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="My Title"

        />

</com.google.android.material.textfield.TextInputLayout>

我期望提示文本(“我的标题”)出现在编辑框的边界上,相反它会出现在文本框中,而文本框的大纲没有任何文本。

我该怎么解决这个问题?

编辑-我的应用程序主题的父版本是"Theme.MaterialComponents.DayNight.DarkActionBar“

EN

回答 1

Stack Overflow用户

发布于 2021-12-19 06:58:31

如果其他人感到困惑,提示文本将在空框中显示,并与文本一起浮动。谢谢。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70407595

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档