title: DialogFragment buttons color change in Lollipop
body: <p>I would like my Fragments to look consistent with the rest of the app and color palette which I applied so I would like to change the colors not only of title, but also of positive/negative buttons:
  <img src="https://i.stack.imgur.com/mOCUP.png" alt="enter image description here"></p>
  
  <p>I tried to do this like this, but unfortunetaly it doesn't work:</p>
  
  <pre><code>public void onStart() {
          super.onStart();
          Dialog d = getDialog();
          int dividerId = d.getContext().getResources().getIdentifier("android:id/titleDivider", null, null);
          View divider = d.findViewById(dividerId);
  
          if(currentapiVersion&lt; Build.VERSION_CODES.LOLLIPOP) {
              divider.setBackgroundColor(getResources().getColor(R.color.accent));
              LinearLayout ll = (LinearLayout) d.findViewById(R.id.dialog_background);
              ll.setBackgroundResource(R.drawable.backrepeat_reversed);
          }
          if(currentapiVersion == Build.VERSION_CODES.LOLLIPOP) {
              int buttonsId = d.getContext().getResources().getIdentifier("android:id/negativeButton", null, null);
              Button b = (Button) d.findViewById(buttonsId);
              b.setTextColor(getResources().getColor(R.color.accent));
          }
          int textViewId = d.getContext().getResources().getIdentifier("android:id/alertTitle", null, null);
          TextView tv = (TextView) d.findViewById(textViewId);
  
          tv.setTextColor(getResources().getColor(R.color.accent));
      }
  </code></pre>
  
  <p>How to change the color of these buttons? Maybe it is possibile to do it in the whole application through styles.xml file?</p>