title: Programmatically Set Background Resource of EditText to transparent field
body: <p>This is the default way an EditText looks when I create one:</p>
  
  <p><img src="https://i.stack.imgur.com/UYe6k.png" alt=""></p>
  
  <p>This is what it looks like after I change the background of it:</p>
  
  <p><img src="https://i.stack.imgur.com/JdzW5.png" alt="enter image description here"></p>
  
  <p>To change the background to the image above, I add the following EditText property to my EditText in my XML file:</p>
  
  <pre class="lang-xml prettyprint-override"><code>android:background="@android:drawable/edit_text"
  </code></pre>
  
  <hr>
  
  <p>What I want to do is do what I've done above in my activity class (giving the user an option to select between the classic style and the transparent/new style).</p>
  
  <p>So like this - I need people to fill in the <code>/*...*/</code></p>
  
  
  
  <pre><code>if (classicTextbox()) { // the blocky white one
  
      editText.setTextColor(Color.BLACK);
      editText.setBackgroundResource(android.R.drawable.edit_text);
  
  } else { // the new transparent one
  
      editText.setTextColor(Color.WHITE);
      editText.setBackgroundResource(/*...*/);
  }
  </code></pre>
  
  <p>So how do I change it back to the new, transparent EditText style?</p>