title: Android Problem adding hint on a TextInputEditText
body: <p>I want to make a custom dialog that I can re-use to configure some parameters. I added a default hint that I want to modify each time the user opens the Dialog.</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      android:orientation=&quot;vertical&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:padding=&quot;@dimen/space_default&quot;&gt;
      &lt;com.google.android.material.textfield.TextInputLayout
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          style=&quot;@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense&quot;&gt;
          &lt;com.google.android.material.textfield.TextInputEditText
              android:id=&quot;@+id/etValue&quot;
              android:layout_width=&quot;match_parent&quot;
              android:hint=&quot;default&quot;
              android:layout_height=&quot;wrap_content&quot;/&gt;
      &lt;/com.google.android.material.textfield.TextInputLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  <p>When I set the Hint programmatically, the default hint is not modified and a second hint is added.</p>
  <pre><code>binding.clDireccion.setOnClickListener {
      val dialogView = layoutInflater.inflate(R.layout.dialog_configuration, null)
      val valueEditText = dialogView.findViewById&lt;TextInputEditText&gt;(R.id.etValue)
      
      valueEditText.setHint(&quot;Direccion&quot;)
      
      MaterialAlertDialogBuilder(this)
          .setView(dialogView)
          .setCancelable(false)
          .setPositiveButton(&quot;Modificar&quot;) { dialogInterface, i -&gt;
              val textValue = valueEditText.text.toString()
              with(preference.edit()) {
                  putString(getString(R.string.sp_direccion), textValue).apply()
              }
          }
          .setNegativeButton(&quot;Cancelar&quot;, null)
          .show();
  }
  </code></pre>
  <p>This is the result:</p>
  <p><a href="https://i.stack.imgur.com/UN7Ow.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UN7Ow.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/k9Jwm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k9Jwm.png" alt="enter image description here" /></a></p>
  <p>My expected result is to modify the default hint and I also want that when the EditText is focused the Hint moves to the top like the default.</p>
  <p>Thanks in advance!</p>