title: Android: Make TextInputLayout Read-Only
body: <p>How can I set a <code>TextInputLayout</code> to read only?</p>
  
  <p>My code is as shown below:</p>
  
  <pre><code>&lt;com.google.android.material.textfield.TextInputLayout
          android:id="@+id/TextInputLayout_fromAddAbsenceBottomSheet_AbsenceTaken"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginTop="8dp"
          android:layout_marginStart="16dp"
          android:layout_marginEnd="16dp"
          android:hint="Absence Taken"
          app:helperText="* Optional"
          app:layout_constraintEnd_toEndOf="@+id/TextInputLayout_fromAddAbsenceBottomSheet_AbsenceGiven"
          app:layout_constraintStart_toStartOf="@+id/TextInputLayout_fromAddAbsenceBottomSheet_AbsenceGiven"
          app:layout_constraintTop_toBottomOf="@+id/TextInputLayout_fromAddAbsenceBottomSheet_AbsenceGiven"
          style="@style/Widget.Unify.TextInputLayout"&gt;
  
          &lt;com.google.android.material.textfield.TextInputEditText
              android:id="@+id/TextField_fromAddAbsenceBottomSheet_AbsenceTaken"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:inputType="numberDecimal"
              style="@style/Widget.Unify.EditText"/&gt;
  
      &lt;/com.google.android.material.textfield.TextInputLayout&gt;
  </code></pre>
  
  <p>I need to make the <code>TextInputLayout</code> read only NOT THE <code>EditText</code>.</p>
  
  <p>I need to make it read only at the <code>TextInputLayout</code> level because I need to apply a style to it.</p>
  
  <p>I've already tried <code>android:enabled="false"</code> in the <code>TextInputLayout</code> but it still lets me change the text.</p>