我想更改TextInputEditText提示的文本颜色.似乎无论我改变什么,颜色总是主应用主题的颜色.
<android.support.design.widget.TextInputLayout
android:id="@+id/enter_template_name_edit_text_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColorHint="@color/warm_grey">
<android.support.design.widget.TextInputEditText
android:id="@+id/template_name_text_input_edit_text"
style="@style/EditTextBaseStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="start"
android:hint="@string/add_nitrogen_template_name_label"
android:imeOptions="actionNext"
android:inputType="textCapWords|textNoSuggestions"
android:maxLines="1"
android:paddingBottom="@dimen/md_content_padding_bottom"
android:textAlignment="textStart"
android:textColorHint="@color/warm_grey"
android:textSize="32sp" />
Run Code Online (Sandbox Code Playgroud)
和基本风格
<style name="EditTextBaseStyle" parent="Widget.AppCompat.EditText">
<item name="android:textViewStyle">@style/TextViewStyle</item>
<item name="android:textColor">@color/middle_black</item>
<item name="android:textStyle">normal</item>
<item name="android:textSize">16sp</item>
</style>
Run Code Online (Sandbox Code Playgroud)
我试过添加
android:textColorHint="@color/warm_grey"
Run Code Online (Sandbox Code Playgroud)
对基本风格以及我的AppTheme而言并没有帮助.
这是我的AppTheme
<style name="AppTheme" parent="Theme.AppCompat">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/primary</item>
<item name="android:textColorHint">@color/primary_text</item>
<item name="android:windowBackground">@null</item>
<item name="android:windowSoftInputMode">stateHidden|adjustPan</item>
</style>
Run Code Online (Sandbox Code Playgroud)
我在这里缺少什么?
谢谢,奥特曼
编辑:该提示是当字段不正确的颜色不具有焦点.当字段获得焦点时,提示移动到字段上方并显示不正确的颜色.
我有一些我想在 firebase 控制台中实时测试的用户属性/标签。我已经正确设置了所有管道,因为我确实看到了几个小时后上传的构建中的标签。
我已经读到命令adb shell setprop debug.firebase.analytics.app <package_name>应该解决这个问题,但它似乎对我不起作用。
我采取的步骤:
通过 Android Studio 运行构建
在 Android Studio 中打开终端并运行adb shell setprop debug.firebase.analytics.app com.x.y.android.qa.debug(其中 x 和 y 是我的应用程序标识符,qa 是调试构建的风格和调试)
我的 Firebase DebugView 仪表板中仍然没有可用的设备。
我错过了一步吗?我是否需要从命令行构建和部署应用程序?
谢谢,奥特曼
我目前正在按照本教程开始使用水豚和硒测试 rspec。我包含了必要的 gems 并运行了捆绑安装,但似乎无法找到rails_helper.rb来继续本教程。
这是在 Rails 4.2.4 上。
谢谢,奥特曼
有没有办法禁用 BottomNavigationView 的轻微放大所选项目的文本/图标的实现?
谢谢,奥特曼
我正在尝试编写打开外部文件的代码,并打印出该文件中的行,但不断获取
第7行:警告:内置函数'exit'的不兼容隐式声明
第15行:错误:'%'标记之前的预期表达式第15行:错误:程序中的错误'\'
在尝试编译此代码时:
#include <stdio.h>
#include <assert.h>
main(int argc, char *argv[]){
if (argc != 2){
fprintf(stderr, "usage: strgen <file>\n");
exit(1);
}
char *infile = argv[1];
FILE *fp = fopen(infile, "r");
assert(fp != NULL);
char buffer[50];
while( fgets( buffer, 50, fp) != NULL){
printf("%d\n",buffer);
printf(%s\n, buffer);
}
fclose(fp);
return(0);
}
Run Code Online (Sandbox Code Playgroud)