I have a textinputlayout on an white background but the background seems greyish.how can i remove this effect
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_marginTop="@dimen/vertical_field_spacing"
android:layout_height="wrap_content"
android:background="@null"
android:layout_gravity="left"
android:orientation="horizontal">
<EditText
android:gravity="left"
android:layout_width="match_parent"
android:inputType="textEmailAddress"
android:layout_height="wrap_content"
android:hint="Email"/>
</com.google.android.material.textfield.TextInputLayout>
You could remove the background by setting it to transparent this way:
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_marginTop="@dimen/vertical_field_spacing"
android:layout_height="wrap_content"
app:boxBackgroundColor="@android:color/transparent"
android:background="@android:color/transparent"
android:layout_gravity="left"
android:orientation="horizontal">
<EditText
android:gravity="left"
android:layout_width="match_parent"
android:background="@null"
android:inputType="textEmailAddress"
android:layout_height="wrap_content"
android:hint="Email"/>
</com.google.android.material.textfield.TextInputLayout>
Note these two lines:
app:boxBackgroundColor="@android:color/transparent"
android:background="@android:color/transparent"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.