我已在styles.xml
。
<style name="SignUpMaterialTheme.Base"
parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/splashBg</item>
<item name="colorAccent">@color/colorPrimary</item>
<item name="colorControlNormal">#f2efea</item>
<item name="colorControlActivated">#f2efea</item>
</style>
我正在EditText
使用TextInputLayout
,所以当我点击它时,我会显示DatePickerDialog
。现在我遇到的问题是所选颜色的日期显示为白色,但我已经在我的风格中声明了颜色accent
。当我尝试删除colorControlNormal
和colorControlActivated
时,它会将所选日期显示为accent
颜色,但TextInputLayout
颜色会变为黑色。怎么办?
有什么建议吗?
答案 0 :(得分:0)
浅色:
DatePickerDialog datepickerdialog = new DatePickerDialog(getActivity(),
AlertDialog.THEME_DEVICE_DEFAULT_DARK,this,year,month,day);
暗色:
DatePickerDialog datepickerdialog = new DatePickerDialog(getActivity(),
AlertDialog.THEME_DEVICE_DEFAULT_LIGHT,this,year,month,day);