0

I have declared material theme in my 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>

I am using EditText with TextInputLayout, so when I click on it I am showing a DatePickerDialog. Now the problem I am facing is the date selected color is showing as white, but I have already declared the color accent in my style. When I tried removing the colorControlNormal and colorControlActivated it shows the date selected as the accent color but the TextInputLayout color changes to black. What to do?

Any suggestions?

4
  • Just to sure... Did you set your style like app or activity theme? Oct 26, 2016 at 11:52
  • yes in manifest for that activity Oct 26, 2016 at 12:11
  • It's strange. Do u create it so? Oct 26, 2016 at 12:18
  • It will better if u post a code where u create DatePickerDialog. Oct 26, 2016 at 12:20

1 Answer 1

0

for light color:

DatePickerDialog datepickerdialog = new DatePickerDialog(getActivity(),
AlertDialog.THEME_DEVICE_DEFAULT_DARK,this,year,month,day);

for dark color:

DatePickerDialog datepickerdialog = new DatePickerDialog(getActivity(),
 AlertDialog.THEME_DEVICE_DEFAULT_LIGHT,this,year,month,day);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.