Change DatePicker header text color

后端 未结 3 809
予麋鹿
予麋鹿 2020-12-10 18:34

I have a datepicker that\'s showing a header on Lollipop, it looks like this

I want to either change the color of the big date in the header from black to white, or

3条回答
  •  囚心锁ツ
    2020-12-10 19:23

    Try this, it might help you:

    Edit your styles.xml as:

    
    

    And add below lines to your code:

    new DatePickerDialog(MainActivity.this, R.style.DialogTheme, new DatePickerDialog.OnDateSetListener() {
    @Override
    public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
        //DO SOMETHING
      }
    }, 2015, 02, 26).show();
    

提交回复
热议问题