android中textcolor属性,android – EditText和TextView textColorPrimary不遵循API lt;21的主题颜色...
在设计工具栏视图以使其适用于API 21及以下版本时存在一些问题,但我认为我有这个styles.xml
@color/colorPrimary
@color/colorPrimaryDark
@color/colorPrimary
@color/white
@color/grey
这在我的screen1.xml工具栏中
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:theme="@style/AppToolbarTheme"
app:popupTheme="@style/AppPopupToolbarTheme"
android:id="@+id/app_bar">
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/toolbar_text"
android:textColor="?android:textColorPrimary"
android:gravity="center"/>
上面的“?android:textColorPrimary”在API< 21,然后回到深色文本颜色而不是我的@ color / white.
但是我仍然认为可以通过使用setSupportActionBar((工具栏)findViewById(R.id.app_bar))“自动生成”TextView标题;在Activity.onCreate()中,我可以看到TextView跟随我的textColorPrimary.
> android应该是什么:textColor =?要么
>如何从ActionBar支持中看到生成的TextView(如浏览器F12)?所以我也可以申请.
解决方法:
textcolor属性的正确值应为:
android:textColor="?android:attr/textColorPrimary"
标签:android,android-layout,material-design
来源: https://codeday.me/bug/20190623/1275190.html
android中textcolor属性,android – EditText和TextView textColorPrimary不遵循API lt;21的主题颜色...相关推荐
- Android中当一行显示两个TextView时,第一个可“…”,而第二个必须显示全部
在Android中当一行显示两个TextView时,第一个可"-",而第二个必须全部显示这种布局时: <RelativeLayout android:layout_width ...
- 【错误记录】Android 中使用 Kotlin 为 EditText 组件设置文本报错 ( Type mismatch. Required:Editable. Found:String )
文章目录 一.报错信息 二.解决方案 一.报错信息 在 Android 中使用 Kotlin 开发 , EditText 组件如下 : 布局文件 : <EditTextandroid:id=&q ...
- Android工具修复属性,Android 热修复介绍之代码修复
什么是Android热修复技术 简单来说就是不重新安装apk的情况下,通过补丁,修复bug 正常开发流程 热修复开发流程 目前主流的热修复技术框架 阿里系的: Andfix.Hotfix.Sophix ...
- Android中shape属性详解
一.简单使用 刚开始,就先不讲一堆标签的意义及用法,先简单看看shape标签怎么用. 1.新建shape文件 首先在res/drawable文件夹下,新建一个文件,命名为:shape_radius.x ...
- android edittext设置内容为空,Android中给数据库添加EditText中内容,添加后数据为空的情况...
搞了两天的代码,将EditText中内容添加至数据库,怎么都搞不定,总是插入数据为空: 这里需要将获取EditText内容的代码写在onClick函数中. 举例如下: EditText代码如下: an ...
- Android中visibility属性VISIBLE、INVISIBLE、GONE的区别
在Android开发中,大部分控件都有visibility这个属性,其属性有3个分别为"visible "."invisible"."gone&quo ...
- JAVA中的visible什么意思_详解Android中visibility属性VISIBLE、INVISIBLE、GONE的区别
在Android开发中,大部分控件都有visibility这个属性,其属性有3个分别为"visible "."invisible"."gone&quo ...
- Android中的属性动画
1.属性动画简介 接下来我们学习Android动画中的第三种动画--属性动画(Property Animation) Animation一般动画就是我们前面学的帧动画和补间动画!Animator则是本 ...
- android中各属性布局,Android里面各布局的属性定义
LinearLayout(线性布局) 提供了控件水平垂直排列的模型,同时可以通过设置子控件的weight布局参数控制各个控件在布局中的相对大小. 水平(vertical) 垂直(horizontal) ...
最新文章
- java js 转换_[Java教程]javascript 类型转换。
- 为什么需要系统程序员来构建云和IT自动化基础
- 枚举enum与#define 宏的区别?
- 学习笔记99—word 如何增加底纹
- Linux学习之033_2
- 通过在操作系统中实际操作,学习和理解 Unicode 编码相关知识
- php is_null(,PHP empty() isset() is_null() 区别与性能比较
- down.php无法打开,php下载文件 图片不能打开,该怎么解决
- linux渗透测试_渗透测试:选择正确的(Linux)工具栈来修复损坏的IT安全性
- ORACLE使用JOB定时备份数据库
- 发掘 CPU 与超级工厂的共性,程序员的心思你别猜
- Java学习笔记-Spring IoC 通过XML把Bean给IoC容器
- spring-注解实现入门
- java重定向post_java实现响应重定向发送post请求操作示例
- 【大学物理】设计性实验报告
- PLC PID调试总结
- AI上推荐 之 NeuralCF与PNN模型(改变特征交叉方式)
- MarkDown 标题居中
- 什么是http协议?
- 全国城市-拼音-编号Json数据(只城市)
热门文章
- 学 Python 必看书单汇总
- 最常用 150 个Linux命令汇总(建议收藏)
- 我在 GitHub 上看到了一个丧心病狂的开源项目!治好了我的拖延症
- 自然语言处理(NLP)之用深度学习实现命名实体识别(NER)
- Redis重要文档、数据结构、操作行为
- 在Pycharm工具中配置集成Git和GitHub
- python中的pop()函数和popleft()函数
- Ubuntu16.04默认安装了Python2.7和3.5 升级python3.5为3.6
- 导致美国大范围网络瘫痪的Mirai僵尸网络
- ​别再用方括号在Python中获取字典的值,试试这个方法