Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

underlineColor transparent not working on API 21 #30897

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import android.content.res.ColorStateList;
import android.graphics.BlendMode;
import android.graphics.BlendModeColorFilter;
import android.graphics.Color;
fabOnReact marked this conversation as resolved.
Show resolved Hide resolved
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
Expand Down Expand Up @@ -542,6 +543,10 @@ public void setUnderlineColor(ReactEditText view, @Nullable Integer underlineCol
}
}

fabOnReact marked this conversation as resolved.
Show resolved Hide resolved
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
setBorderColor(view, 4, Color.TRANSPARENT);
}

if (underlineColor == null) {
drawableToMutate.clearColorFilter();
fabOnReact marked this conversation as resolved.
Show resolved Hide resolved
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ module.exports = ([
return (
<TextInput
autoFocus={true}
style={styles.default}
underlineColorAndroid="transparent"
accessibilityLabel="I am the accessibility label for text input"
/>
);
Expand Down