-
Notifications
You must be signed in to change notification settings - Fork 24.8k
underlineColor transparent not working on API 21 #30897
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
Changes from 4 commits
eee5d7b
973c91d
849e0d5
7c5587e
32fb575
c7a6988
4a973bd
3db5667
e707521
3755668
48b8123
573ac33
1017155
6ebac50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
import android.content.res.ColorStateList; | ||
import android.graphics.BlendMode; | ||
import android.graphics.BlendModeColorFilter; | ||
import android.graphics.Color; | ||
import android.graphics.PorterDuff; | ||
import android.graphics.drawable.Drawable; | ||
import android.os.Build; | ||
|
@@ -545,7 +546,14 @@ public void setUnderlineColor(ReactEditText view, @Nullable Integer underlineCol | |
if (underlineColor == null) { | ||
drawableToMutate.clearColorFilter(); | ||
fabOnReact marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} else { | ||
drawableToMutate.setColorFilter(underlineColor, PorterDuff.Mode.SRC_IN); | ||
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a comment here on why this is needed otherwise would be really hard to understand afterwards. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cortinico thanks a lot. I added the comment with commit 6ebac50 and updated the summary of the pull request #30897 (comment) to include a link to fabOnReact/react-native-notes#4 (comment). I remain available. |
||
int bottomBorderColor = view.getBorderColor(Spacing.BOTTOM); | ||
setBorderColor(view, Spacing.BOTTOM, underlineColor); | ||
drawableToMutate.setColorFilter(underlineColor, PorterDuff.Mode.SRC_IN); | ||
setBorderColor(view, Spacing.BOTTOM, bottomBorderColor); | ||
} else { | ||
drawableToMutate.setColorFilter(underlineColor, PorterDuff.Mode.SRC_IN); | ||
} | ||
} | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.