title: How To Change EditText Cursor Color In A Alert Dialog?
body: <p>I am trying to change the EditText blinking cursor color in Alert Dialog because it's not what I want. The color is teal, I want white. Nothing I am doing is changing it. Here is what I mean...
  <img src="https://i.stack.imgur.com/TJMaX.jpg" alt="Alert Dialog With EditText](https://www.bing.com/images/search?view=detailV2&amp;ccid=K1%2fOkkYC&amp;id=7A70653842861A8EF4C2E3FA144B2E06F8A6253E&amp;thid=OIP.K1_OkkYCaIu062eXXFNgjQAAAA&amp;mediaurl=https%3a%2f%2fi.stack.imgur.com%2fKPKvQ.png&amp;exph=193&amp;expw=400&amp;q=edittext+in+alertdialog+colors&amp;simid=608013895961150146&amp;selectedIndex=0)[![enter image description here">]<a href="https://i.stack.imgur.com/TJMaX.jpg" rel="nofollow noreferrer">1</a></p>
  
  <p>Here is what I have...</p>
  
  <p>Java Code:</p>
  
  <pre><code>public void alertDialogWithText(){
      AlertDialog.Builder adb = new AlertDialog.Builder(new ContextThemeWrapper(MainActivity.this, R.style.EditTextAlertDialog));
      adb.setTitle("Title");
      inputET = new EditText(this);
      inputET.setInputType(InputType.TYPE_CLASS_TEXT);
      inputET.setTextColor(getResources().getColor(android.R.color.white));
      adb.setView(inputET);
  
      adb.setPositiveButton("OK", new DialogInterface.OnClickListener() {
          @Override
          public void onClick(DialogInterface dialog, int which) {
  
          }
      });
  
      adb.show();
  }
  </code></pre>
  
  <p>Colors.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  &lt;color name="colorPrimary"&gt;#303030&lt;/color&gt;
  &lt;color name="colorPrimaryDark"&gt;#000&lt;/color&gt;
  &lt;color name="colorAccent"&gt;#fff&lt;/color&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>Styles.xml:</p>
  
  <pre><code>&lt;style name="EditTextAlertDialog"&gt;
      &lt;item name="android:textColor"&gt;@android:color/white&lt;/item&gt;
      &lt;item name="android:background"&gt;#444&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>