title: Custom passwordToggleDrawable is too large in TextInputLayout
body: <p>I have used android.support.design.widget.TextInputLayout to make a password input that allows the user to toggle readability on the password. The xml is as follows:</p>
  
  <pre><code>&lt;android.support.design.widget.TextInputLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:hintEnabled="false"
      app:passwordToggleDrawable="@drawable/password_toggle_selector"
      app:passwordToggleEnabled="true" &gt;
  
      &lt;android.support.design.widget.TextInputEditText
          android:id="@+id/password"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:hint="Password"
          android:inputType="textPassword"/&gt;
  &lt;/android.support.design.widget.TextInputLayout&gt;
  </code></pre>
  
  <p>The drawable selector is as described by <a href="https://stackoverflow.com/questions/45397979/how-to-customize-android-passwordtoggledrawable">How to customize android passwordToggleDrawable</a></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;item android:drawable="@drawable/password_toggle_show" 
            android:state_checked="true"/&gt;
      &lt;item android:drawable="@drawable/password_toggle_hide"/&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p><strong>The issue</strong> is that the custom drawable becomes really large. Not larger than the edittext, but rather it seems to maximize its size while still fitting inside it (so, it seems to be bounded by the height of the element). However, if I leave the passwordToggleDrawable property unset, the drawable for the toggle is sized as is normal for android (I am sure you have seen the icon in other apps before). After much searching I have found a way to resize the custom one, but I am not happy with how its done (requires 2 <em>extra</em> xml files per drawable) and it only works for API 23+. </p>
  
  <ul>
  <li><em>I would like to know if there is a good way to set the size of the drawable, or better yet, make it target the size of the default drawable?</em></li>
  </ul>
  
  <p><strong>I have tried</strong> setting the padding of the EditText as the source of TextInputLayout says that it gets the four paddings from it and apply to the mPasswordToggleView (line 1143), but it made no change on the icon and (as expected) also affected the padding of the EditText. I have tried setting minheight to 0. I have also tried changing between EditText and TextInputEditText (using the latter now as it seems to be recommended). I have tried switching the layout_height properties to wrap_content. I have tried scaling the drawable using xml's <code>&lt;scale&gt;</code> tag with the scale properties set. I have tried similarly with the <code>&lt;inset&gt;</code> tag. <em>But none of those methods works.</em></p>
  
  <p>The way I found (and am currently using) to resize the drawable <strong>that actually works</strong> is by using the xml tag <code>&lt;layer-list&gt;</code>, while setting the width and height properties. Then the <code>&lt;selector&gt;</code> xml file references those resized drawables instead of the png ones. But I don't like this solution because as I mentioned it requires API 23 and because of that results in a total of 4 extra xml files. It also sets the width and height by themselves, instead of keeping the ratio locked.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;item
          android:drawable="@drawable/password_toggle_hide"
          android:width="22dp"
          android:height="15dp"/&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p><strong>TL;DR</strong>
  How do I set the size of a custom passwordToggleDrawable in TextInputLayout? Preferably to same size as the default drawable.</p>