Created
May 21, 2023 11:15
-
-
Save MostafaGad1911/d328c8e8e21a82d20316f64c1961543b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<com.google.android.material.textfield.TextInputLayout | |
style="@style/TextInputLayoutStyle" | |
android:id="@+id/textInputLyt" | |
android:layout_width="match_parent" | |
android:layout_height="60dp" | |
android:elevation="2dp" | |
android:textColorHint="@color/color_b9b9b9" | |
android:textSize="@dimen/dimen_14f" | |
app:boxCornerRadiusBottomEnd="8dp" | |
app:boxCornerRadiusBottomStart="8dp" | |
app:boxCornerRadiusTopEnd="8dp" | |
android:gravity="center" | |
app:errorEnabled="false" | |
app:boxBackgroundMode="filled" // fix extra padding in text input layout | |
app:hintTextColor="Color.GRAY" | |
> | |
<com.google.android.material.textfield.TextInputEditText | |
android:id="@+id/text_input_phone" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:hint="Phone number" | |
android:gravity="start|center" | |
android:textAlignment="viewStart" | |
android:imeOptions="actionDone" | |
android:inputType="phone" | |
android:maxLength="9" | |
android:background="@null" // fix yellow color after typing | |
android:singleLine="true" | |
android:textColor="Color.BLACK" | |
android:textColorHint="Color.GRAY" | |
android:textSize="14sp" /> | |
</com.google.android.material.textfield.TextInputLayout> | |
<style name="TextInputLayoutStyle" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"> | |
<item name="boxStrokeColor">Color.BLACK</item> | |
<item name="boxStrokeWidth">2dp</item> | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment