首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TextInputLayout变更主题

TextInputLayout变更主题
EN

Stack Overflow用户
提问于 2015-12-13 12:40:07
回答 1查看 1.1K关注 0票数 1

有谁知道如何将TextInputLayout从浅色主题更改为深色主题,如下面链接的设计规范所示?

代码语言:javascript
复制
<android.support.design.widget.TextInputLayout
 android:layout_width="match_parent"
 android:layout_height="wrap_content" >

            <EditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

</android.support.design.widget.TextInputLayout>

Design Spec TextInputLayout

EN

回答 1

Stack Overflow用户

发布于 2020-07-07 03:37:34

我建议使用材质设计库,如下所述:

https://material.io/develop/android/components/text-fields

然后让你的应用主题扩展一些使用黑暗模式的主题。例如:

代码语言:javascript
复制
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
    <!-- Customize your theme here. -->
</style>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34248045

复制
相关文章

相似问题

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