mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Do not reference setTranslucentBackgroundDrawable (#46754)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46754 This method has been deprecated since 0.76, but we're still using it inside our codebase. I'm cleaning up the only usage of it replacing it with the implementation. Changelog: [Internal] [Changed] - Do not reference `setTranslucentBackgroundDrawable` Reviewed By: cipolleschi Differential Revision: D63695933 fbshipit-source-id: d39b13b584d3ac1406c61c3bf86b86b05dc984d9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
eb3d352761
commit
3cd46b9534
+8
-4
@@ -8,6 +8,7 @@
|
||||
package com.facebook.react.views.view;
|
||||
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.View;
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -228,10 +229,13 @@ public class ReactViewManager extends ReactClippingViewManager<ReactViewGroup> {
|
||||
|
||||
@ReactProp(name = "nativeBackgroundAndroid")
|
||||
public void setNativeBackground(ReactViewGroup view, @Nullable ReadableMap bg) {
|
||||
view.setTranslucentBackgroundDrawable(
|
||||
bg == null
|
||||
? null
|
||||
: ReactDrawableHelper.createDrawableFromJSDescription(view.getContext(), bg));
|
||||
Drawable background;
|
||||
if (bg != null) {
|
||||
background = ReactDrawableHelper.createDrawableFromJSDescription(view.getContext(), bg);
|
||||
} else {
|
||||
background = null;
|
||||
}
|
||||
BackgroundStyleApplicator.setFeedbackUnderlay(view, background);
|
||||
}
|
||||
|
||||
@ReactProp(name = "nativeForegroundAndroid")
|
||||
|
||||
Reference in New Issue
Block a user