1.)  add gradle file if not supporting  
dependencies {
      compile "com.android.support:design:24.2.0"
 }  
<com.google.android.material.textfield.TextInputLayout        android:id="@+id/filledTextField"
         style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
         android:layout_width="match_parent"        android:layout_height="wrap_content"        android:layout_marginStart="32dp"        android:layout_marginTop="64dp"        android:layout_marginEnd="32dp"        android:hint="Enter something">
         <!--this is the actual edit text which takes the input-->        <com.google.android.material.textfield.TextInputEditText            android:id="@+id/edit_text"            android:layout_width="match_parent"            android:layout_height="wrap_content" />
     </com.google.android.material.textfield.TextInputLayout>
2.)
<com.google.android.material.textfield.TextInputLayout        android:id="@+id/filledTextField"        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:layout_marginStart="32dp"        android:layout_marginTop="64dp"        android:layout_marginEnd="32dp"        android:hint="Enter something">         <!--this is the actual edit text which takes the input-->        <com.google.android.material.textfield.TextInputEditText            android:id="@+id/edit_text"            android:layout_width="match_parent"            android:layout_height="wrap_content" />     </com.google.android.material.textfield.TextInputLayout>
3.)
<com.google.android.material.textfield.TextInputLayout        android:id="@+id/filledTextField"        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:layout_marginStart="32dp"        android:layout_marginTop="64dp"        android:layout_marginEnd="32dp"        android:hint="Enter something">         <!--this is the actual edit text which takes the input-->        <com.google.android.material.textfield.TextInputEditText            android:id="@+id/edit_text"            android:layout_width="match_parent"            android:layout_height="wrap_content" />     </com.google.android.material.textfield.TextInputLayout>

 
 
0 Comments