Skip to content

Instantly share code, notes, and snippets.

@LisovyiDK
Last active March 6, 2020 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LisovyiDK/b595bd1dab1d0c2928af4c6622f4e62a to your computer and use it in GitHub Desktop.
Save LisovyiDK/b595bd1dab1d0c2928af4c6622f4e62a to your computer and use it in GitHub Desktop.
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/default_text_input_layout"
android:theme="@style/EditTextThemeOverlay"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:hint="Default"
android:textColorHint="@color/purple"
app:helperText="Default helper"
app:helperTextTextAppearance="@style/HelperTextAppearance"
app:errorTextAppearance="@style/ErrorTextAppearance"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/default_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:paddingTop="20dp"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:textColorHighlight="@color/textColorHighlight"
app:backgroundTint="@color/purple" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/filled_text_input_layout"
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
android:theme="@style/EditTextThemeOverlay"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:hint="FilledBox"
android:textColorHint="@color/purple"
app:boxBackgroundColor="@color/purpleAlpha15"
app:helperText="FilledBox helper"
app:helperTextTextAppearance="@style/HelperTextAppearance"
app:errorTextAppearance="@style/ErrorTextAppearance"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/default_text_input_layout">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/filled_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="-10dp"
android:paddingTop="20dp"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:textColorHighlight="@color/textColorHighlight"
app:backgroundTint="@color/purple" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/outlined_text_input_layout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:theme="@style/EditTextThemeOverlay"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:hint="OutlinedBox"
android:textColorHint="@color/purple"
app:helperText="OutlinedBox helper helper"
app:helperTextTextAppearance="@style/HelperTextAppearance"
app:boxStrokeColor="@color/purple"
app:errorTextAppearance="@style/ErrorTextAppearance"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/filled_text_input_layout">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/outlined_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:paddingTop="20dp"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:textColorHighlight="@color/textColorHighlight" />
</com.google.android.material.textfield.TextInputLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment